Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store: fix label extending #4985

Merged
merged 1 commit into from
Dec 22, 2021
Merged

Conversation

GiedriusS
Copy link
Member

Use the appropriate function labelpb.ExtendSortedLabels to extend the
labelset in queryPrometheus with external labels. It maintains the
invariant that labelset is a sorted set of labels. Otherwise, random
errors might occur with pushdown enabled:
Error executing query: vector cannot contain metrics with the same labelset

I have triggered this with a weird query max_over_time(up[5m]) & with
HA pairs.

Signed-off-by: Giedrius Statkevičius giedrius.statkevicius@vinted.com

Use the appropriate function `labelpb.ExtendSortedLabels` to extend the
labelset in `queryPrometheus` with external labels. It maintains the
invariant that labelset is a sorted set of labels. Otherwise, random
errors might occur with pushdown enabled:
`Error executing query: vector cannot contain metrics with the same labelset`

I have triggered this with a weird query `max_over_time(up[5m])` & with
HA pairs.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
@GiedriusS
Copy link
Member Author

cc @fpetkovski

Copy link
Contributor

@fpetkovski fpetkovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for catching this

@GiedriusS GiedriusS merged commit 53ec210 into thanos-io:main Dec 22, 2021
@GiedriusS GiedriusS deleted the fix_label_extending branch December 22, 2021 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants