Manipulate ingesters query min time when -querier.query-ingesters-within is set #2904
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:
When running the Cortex blocks storage, the blocks retention in the ingesters may be way higher than the configured
-querier.query-ingesters-within
(eg. in the cortex-mixin we do have a default of 4 days blocks retention in the ingesters, to give operators enough time to recover from any issue causing blocks not being shipped from ingesters to storage, in case of an outage).Running the blocks storage with a
-querier.query-ingesters-within
significantly higher than the retention means that (under normal conditions) all samples older than-querier.query-store-after
and more recent than-querier.query-ingesters-within
are both fetched from ingesters and storage, causing an undesired extra load on ingesters.Similarly to what we do with
-querier.query-store-after
in the blocks storage, in this PR I'm proposing to manipulate the min time range of the query sent to ingesters to guarantee not being older than-querier.query-ingesters-within
. This change applies both to chunks and blocks storage.Which issue(s) this PR fixes:
N/A
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]