-
Notifications
You must be signed in to change notification settings - Fork 802
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
max chunks per query limit shared between ingesters and storage gateways #4260
Conversation
a122db9
to
b0039f7
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.
Thanks! Looks good! Had a few comments on configuration options and some other small things. I also want to call out that we should refactor and remove the blocksStoreLimitsMock
from the Blocks store queryable tests. I don't think that should be required for this PR but it would be nice.
CHANGELOG.md
Outdated
@@ -45,7 +45,7 @@ | |||
* [BUGFIX] Fixed cache fetch error on Redis Cluster. #4056 | |||
* [BUGFIX] Ingester: fix issue where runtime limits erroneously override default limits. #4246 | |||
* [BUGFIX] Ruler: fix startup in single-binary mode when the new `ruler_storage` is used. #4252 | |||
|
|||
* [CHANGE] Querier / ruler: Migrate the -querier.max-fetched-chunks-per-query limit to the new QueryLimiter to limit the number of chunks returned as a sum of chunks returned from the ingester and storage gateway. |
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 you add the PR number as part of the change log entry.
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.
Also please move it above, grouping it along with other [CHANGE]
entries.
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.
All good, just need to fix up CHANGELOG.
Note the CHANGELOG message should be from the point of view of the user, who isn't so concerned that we moved code around but does want to know about the change in behaviour.
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.
Good job, LGTM! I left a couple of nits. I would be glad if you could address them before merging 🙏
CHANGELOG.md
Outdated
@@ -45,7 +45,7 @@ | |||
* [BUGFIX] Fixed cache fetch error on Redis Cluster. #4056 | |||
* [BUGFIX] Ingester: fix issue where runtime limits erroneously override default limits. #4246 | |||
* [BUGFIX] Ruler: fix startup in single-binary mode when the new `ruler_storage` is used. #4252 | |||
|
|||
* [CHANGE] Querier / ruler: Migrate the -querier.max-fetched-chunks-per-query limit to the new QueryLimiter to limit the number of chunks returned as a sum of chunks returned from the ingester and storage gateway. |
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.
Also please move it above, grouping it along with other [CHANGE]
entries.
pkg/util/validation/limits.go
Outdated
@@ -147,7 +147,7 @@ func (l *Limits) RegisterFlags(f *flag.FlagSet) { | |||
f.IntVar(&l.MaxGlobalMetricsWithMetadataPerUser, "ingester.max-global-metadata-per-user", 0, "The maximum number of active metrics with metadata per user, across the cluster. 0 to disable. Supported only if -distributor.shard-by-all-labels is true.") | |||
f.IntVar(&l.MaxGlobalMetadataPerMetric, "ingester.max-global-metadata-per-metric", 0, "The maximum number of metadata per metric, across the cluster. 0 to disable.") | |||
f.IntVar(&l.MaxChunksPerQueryFromStore, "store.query-chunk-limit", 2e6, "Deprecated. Use -querier.max-fetched-chunks-per-query CLI flag and its respective YAML config option instead. Maximum number of chunks that can be fetched in a single query. This limit is enforced when fetching chunks from the long-term storage only. When running the Cortex chunks storage, this limit is enforced in the querier and ruler, while when running the Cortex blocks storage this limit is enforced in the querier, ruler and store-gateway. 0 to disable.") | |||
f.IntVar(&l.MaxChunksPerQuery, "querier.max-fetched-chunks-per-query", 0, "Maximum number of chunks that can be fetched in a single query from ingesters and long-term storage: the total number of actual fetched chunks could be 2x the limit, being independently applied when querying ingesters and long-term storage. This limit is enforced in the ingester (if chunks streaming is enabled), querier, ruler and store-gateway. Takes precedence over the deprecated -store.query-chunk-limit. 0 to disable.") | |||
f.IntVar(&l.MaxChunksPerQuery, "querier.max-fetched-chunks-per-query", 0, "Maximum number of chunks that can be fetched in a single query from ingesters and long-term storage. This limit is enforced in the ingester (if chunks streaming is enabled), querier, ruler and store-gateway. Takes precedence over the deprecated -store.query-chunk-limit. 0 to disable.") |
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.
It's not enforced in ingesters, but just in the querier component (which is also internally used by the ruler) and store-gateway.
f.IntVar(&l.MaxChunksPerQuery, "querier.max-fetched-chunks-per-query", 0, "Maximum number of chunks that can be fetched in a single query from ingesters and long-term storage. This limit is enforced in the ingester (if chunks streaming is enabled), querier, ruler and store-gateway. Takes precedence over the deprecated -store.query-chunk-limit. 0 to disable.") | |
f.IntVar(&l.MaxChunksPerQuery, "querier.max-fetched-chunks-per-query", 0, "Maximum number of chunks that can be fetched in a single query from ingesters and long-term storage. This limit is enforced in the querier, ruler and store-gateway. Takes precedence over the deprecated -store.query-chunk-limit. 0 to disable.") |
Signed-off-by: Alan Protasio <approtas@amazon.com>
Signed-off-by: Alan Protasio <approtas@amazon.com>
6d02a11
to
7ede961
Compare
Signed-off-by: Alan Protasio <approtas@amazon.com>
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.
Small tidying required in the CHANGELOG
CHANGELOG.md
Outdated
@@ -59,11 +60,13 @@ | |||
* [BUGFIX] Fixed cache fetch error on Redis Cluster. #4056 | |||
* [BUGFIX] Ingester: fix issue where runtime limits erroneously override default limits. #4246 | |||
* [BUGFIX] Ruler: fix startup in single-binary mode when the new `ruler_storage` is used. #4252 | |||
<<<<<<< HEAD |
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.
Bit of merge conflict debris to clean up
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.
Sorry for that :D
Signed-off-by: Alan Protasio <approtas@amazon.com>
Sorry but we have begun the process of cutting a new release; please rebase from |
Just did it. |
What this PR does:
Address #4255
Which issue(s) this PR fixes:
Fixes #4255
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]