-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
querier: Dedup series is now replica label agnostic and simpler. Fixed panic seen when using larger number of replicas and small series. #2728
Conversation
9d048e4
to
819b1a7
Compare
pkg/query/querier.go
Outdated
// trimReplicaLabels removed replica labels from all series and re-sorts the set so that the same series are coming right after each other. | ||
func trimReplicaLabels(set []storepb.Series, replicaLabels map[string]struct{}) { | ||
for si := range set { | ||
lset := set[si].Labels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we name the lset
to labelSet
? Sounds more intuitive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would stick to lset
I know it might be confusing at the beginning but we are using this name everywhere in Thanos, Prometheus and Cortex. Plus we use lset
ONLY for label sets (: So with this after learning that lset
might make sense, what do you think? (:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, makes sense to follow the convention 😁
It should be good to review, just some tests I need to fix: |
819b1a7
to
3daea58
Compare
Should be good to go now. |
3daea58
to
3b248f0
Compare
…d panic seen when using larger number of replicas and small series. Fixes #2645 Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
3b248f0
to
5da2efd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Fixes #2645
Signed-off-by: Bartlomiej Plotka bwplotka@gmail.com