-
Notifications
You must be signed in to change notification settings - Fork 569
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
Add a flag to adjust queries to some max future time #10547
Conversation
💻 Deploy preview deleted. |
c233984
to
4d6b45d
Compare
a121739
to
c7331c7
Compare
I'm not sure what you mean by this. IIUC queries which fully query outside of the allowed mimir/pkg/frontend/querymiddleware/limits.go Line 180 in bfde5db
|
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.
Thank you, @chencs !
@@ -3625,6 +3625,11 @@ The `limits` block configures default and per-tenant limits imposed by component | |||
# optimize their performance. | |||
[instant_queries_with_subquery_spin_off: <list of strings> | default = ] | |||
|
|||
# (experimental) Mutate incoming queries that look far into the future to only |
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.
Could we use a word other than mutate
? Update
maybe?
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.
I was following the pattern of the query-frontend.align-queries-with-step
description. Is "mutate" an ineffective word choice? This does automatically change the actual query being executed, as opposed to, e.g., being "updated" at the behest of the user executing the query.
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.
If mutate
is the technically accurate word choice, we can leave it. It just sounds somewhat awkward/jarring to me.
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.
queries which fully query outside of the allowed max-lookback will not be executed, but requests which are only modified by max-lookback will continue on to be checked against other limits
You are right (I read the surrounding code wrong).
🔥 The changes looks good to me (except the comments about the changelog)
We just removed basically the same option in 2.14 😄 See #7496 and 286c23c The assumption was that these queries are very cheap to execute. Even hundreds of queries should clear very quickly. The reason why we removed them was that it prevents people from running If you really want to keep it, then can we at least use the previous name of the flag? |
I didn't realize! Thank you for pointing that out.
This is true, but if a tenant tries to execute a future-looking query over many days, they can also quickly hit I'm also happy to just revert this PR if it's not the right way to go about fixing this. |
What this PR does
This PR introduces an experimental flag,
query-frontend.adjust-to-max-future-query-window
. When set with a duration, any range queries querying farther thannow + maxFutureWindow
into the future will be adjusted to query only up tonow + maxFutureWindow
.Which issue(s) this PR fixes or relates to
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.