Enforce "max chunks per query" limit in ingesters too#4125
Merged
pracucci merged 4 commits intocortexproject:masterfrom Apr 28, 2021
Merged
Conversation
bbb1323 to
2cd47a1
Compare
Contributor
|
Can you please rebase against master to pull in #4137 and move the changelog entry to the top? |
pstibrany
approved these changes
Apr 28, 2021
Contributor
pstibrany
left a comment
There was a problem hiding this comment.
Good job, nothing to complain about. :)
pkg/distributor/query.go
Outdated
Contributor
There was a problem hiding this comment.
total? :) if you shorten both (chunksLimit, chunksCount) they will align nicely, and are expressive enough.
pkg/util/labels_test.go
Outdated
Contributor
There was a problem hiding this comment.
Test with __name__ label name would show that no special handling of that name is done.
…ier.max-fetched-chunks-per-query which is applied both to ingesters and long-term storage Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
31815c5 to
a7e3cc8
Compare
Contributor
Author
|
Thanks @pstibrany, I've addressed your feedback! |
3 tasks
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does:
The
-store.query-chunk-limitis only enforced in the long-term storage (but not ingesters). However, there are cases where this limit can actually be hit just querying ingesters, so I would like to apply the limit when fetching chunks from ingesters too.However, if we extend
-store.query-chunk-limitto apply to ingesters too, that could be considered a breaking change, so in this PR I'm proposing to deprecate-store.query-chunk-limitin favour of a new config option-querier.max-fetched-chunks-per-query, whose limit is applied both to ingesters and long-term storage.Due to how the querying works in Cortex (ingesters and long-terms storage are queried separately) in this PR I'm proposing to keep it simple and apply the limit independently to ingesters and storage. This means that the total number of actual fetched chunks could be 2x the limit, being independently applied when querying ingesters and long-term storage. If accepted, this is something we may get back and eventually improve (in my opinion having the limit applied to ingesters too is better than having a true global limit, considering ingesters are currently unbounded, but I'm open to feedback).
Which issue(s) this PR fixes:
N/A
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]