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

sidecar: implement without replica labels capability #6127

Merged
merged 1 commit into from
Feb 20, 2023

Conversation

GiedriusS
Copy link
Member

Implement the new without replica labels capability in Sidecar to have more efficient querying.

pkg/store/prometheus.go Outdated Show resolved Hide resolved
@GiedriusS GiedriusS force-pushed the implement_without_replica_labels_capability_sidecar branch 2 times, most recently from 5ac922b to 6f8f6dd Compare February 20, 2023 08:50
extLsetToRemove := map[string]struct{}{}
for _, lbl := range r.WithoutReplicaLabels {
extLsetToRemove[lbl] = struct{}{}
}
Copy link
Contributor

@fpetkovski fpetkovski Feb 20, 2023

Choose a reason for hiding this comment

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

I know this is still draft, but should we remove the labels from the existing extLset here? This way everything else will keep working and we don't need to do rmLabel everywhere else.

Maybe we should even move this chunk to line 176 to make sure we strip replica labels when skipChunks is true.

Copy link
Member Author

Choose a reason for hiding this comment

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

@fpetkovski you are correct, I had to move this chunk a bit to cover shipChunks case. I actually noticed that Prometheus already sends labels with external labels in them so I'm not sure why we were always calling labels.Extend. I have removed that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense. The good thing with this is that we don't need to copy labels.

@GiedriusS GiedriusS force-pushed the implement_without_replica_labels_capability_sidecar branch from 6f8f6dd to 11efe5c Compare February 20, 2023 09:34
@pull-request-size pull-request-size bot added size/M and removed size/S labels Feb 20, 2023
@GiedriusS GiedriusS force-pushed the implement_without_replica_labels_capability_sidecar branch 2 times, most recently from b4f149c to 27ffd8c Compare February 20, 2023 10:07
Implement the new without replica labels capability in Sidecar to have
more efficient querying.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
@GiedriusS GiedriusS force-pushed the implement_without_replica_labels_capability_sidecar branch from 27ffd8c to dad8ea4 Compare February 20, 2023 10:09
@GiedriusS GiedriusS marked this pull request as ready for review February 20, 2023 10:25
@GiedriusS GiedriusS requested a review from fpetkovski February 20, 2023 10:37
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.

Thanks, LGTM 👍

@GiedriusS GiedriusS merged commit 9eb000a into main Feb 20, 2023
@GiedriusS GiedriusS deleted the implement_without_replica_labels_capability_sidecar branch February 20, 2023 11:20
ngraham20 pushed a commit to ngraham20/thanos that referenced this pull request Apr 17, 2023
Implement the new without replica labels capability in Sidecar to have
more efficient querying.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
ngraham20 pushed a commit to ngraham20/thanos that referenced this pull request Apr 17, 2023
Implement the new without replica labels capability in Sidecar to have
more efficient querying.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
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