Skip to content

Conversation

pstibrany
Copy link
Contributor

shardByAllLabels had a check to verify if labels are sorted properly, but it didn't set lastLabelName, so it was comparing label names against empty string only.

…correctly

shardByAllLabels had a check to verify if labels are sorted properly, but it
didn't set lastLabelName, so it was comparing label names against empty string
only.

Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
@gouthamve
Copy link
Contributor

This change affects only if shardByAllLabels is used right? If yes then LGTM

Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Good that you spotted it! LGTM.

Note to myself: the fix doesn't cause are-sharding (the token in the tests is different because the input fixture is different).

@pstibrany
Copy link
Contributor Author

pstibrany commented Jan 7, 2020

This change affects only if shardByAllLabels is used right? If yes then LGTM

Yes.

Recently I've seen someone pointing out that we are not consistent about this check at various code paths. If only I remembered where it was. I believe that we should disallow unsorted labels everywhere consistently.

Copy link
Contributor

@jtlisi jtlisi left a comment

Choose a reason for hiding this comment

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

LGTM

@gouthamve gouthamve merged commit f49eb9e into cortexproject:master Jan 7, 2020
gouthamve added a commit that referenced this pull request Jan 7, 2020
gouthamve added a commit that referenced this pull request Jan 9, 2020
…s order correctly (#1957)"

This reverts commit f49eb9e.

Signed-off-by: Goutham Veeramachaneni <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants