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

Filter empty labels from sharding key #5717

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

danielblando
Copy link
Contributor

What this PR does:
Prometheus drops labels which are empty
https://github.com/prometheus/prometheus/blob/69abd6d9f65a6358025461510237366f1d939c70/tsdb/head_append.go#L429

When creating the sharding token in distributor for income timeserie we use all labels to create the token. We end up in a situation where after dropping labels with empty values, we have the same timeserie in multiple ingesters. This change ignore labels with empty values to be used by sharding.

Which issue(s) this PR fixes:

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Daniel Deluiggi <[email protected]>
@alanprot
Copy link
Member

That's a interesting case.
LGTM

@danielblando danielblando marked this pull request as ready for review December 20, 2023 21:21
@alvinlin123 alvinlin123 merged commit a1b1954 into cortexproject:master Dec 20, 2023
14 checks passed
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.

3 participants