-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
perf: Avoid looking up unnecessary TSDB symbols during Volume API #13960
perf: Avoid looking up unnecessary TSDB symbols during Volume API #13960
Conversation
pkg/storage/stores/shipper/indexshipper/tsdb/single_file_index.go
Outdated
Show resolved
Hide resolved
for _, k := range targetLabels { | ||
by[k] = struct{}{} |
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.
this should be the same as labelsToMatch
. see
loki/pkg/util/series_volume.go
Line 34 in 9eb557c
func prepareLabelsAndMatchersWithTargets(targetLabels []string, matchers []*labels.Matcher, tenantLabel ...string) (map[string]struct{}, []*labels.Matcher, bool) { |
20227f4
to
a0a429d
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.
The changes look good to me. Once this is marked as ready for review, I will do a final review.
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.
Looks good, need to test in GEL with LBAC before merging.
…afana#13960) Co-authored-by: Trevor Whitney <[email protected]>
…afana#13960) Co-authored-by: Trevor Whitney <[email protected]>
What this PR does / why we need it:
This avoid loading all symbols for stats queries when not needed.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Checklist
CONTRIBUTING.md
guide (required)feat
PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.md
production/helm/loki/Chart.yaml
and updateproduction/helm/loki/CHANGELOG.md
andproduction/helm/loki/README.md
. Example PRdeprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR