-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
threshold based automatic query prioritization #9493
threshold based automatic query prioritization #9493
Conversation
AWESOME! I love it. This will be so useful. If a query surpasses the thresholds several times, for instance it would be several times the segment threshold or the duration threshold would fit into the query time range several times, would the "adjustment" be decremented several times too? |
docs/configuration/index.md
Outdated
|
||
##### Prioritization strategies | ||
|
||
###### No auto prioritization strategy |
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.
nit: hmm, is 'no auto' = 'manual'? Just wondering what is a better name.
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.
"None prioritization strategy" ?
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.
Hmm, after thinking about it, I think manual
maybe makes the most sense, to be symmetrical with the ManualQueryLaningStrategy
of #9492 because both rely on the user adding a value to the query context.
docs/configuration/index.md
Outdated
|
||
###### Threshold deprioritization strategy | ||
|
||
This prioritization strategy deprioritizes queries that cross any of a configurable set of thresholds, such as how far in the past the data is, how large of an interval a query covers, or the number of segments taking part in a 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.
nit: by rephrasing it to say, "... strategy lowers priority of queries that..." , we could make the heading be "Threshold prioritization strategy"
thanks for the review @jihoonson and @himanshug |
Description
This PR is a follow-up to #9407 that adds a new interface
QueryPrioritizationStrategy
intended to enable implementations to automatically prioritize queries based on some criteria. As a proof of concept implementation of this functionality, it providesThresholdBasedQueryDeprioritizationStrategy
, which offers the 3 thresholds of: period from the current time of the query, duration of the interval of the query, and number of segments taking part in the query, described in #6993.This strategy can be enabled by setting
druid.query.scheduler.prioritization.strategy
tothreshold
.druid.query.scheduler.prioritization.periodThreshold
druid.query.scheduler.prioritization.durationThreshold
druid.query.scheduler.prioritization.segmentCountThreshold
druid.query.scheduler.prioritization.adjustment
This PR has: