-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Better max_querier_bytes_read limit error messages #8916
Conversation
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.
Looks great! Once we start using errata
then we can link to the specific settings to be adjusted, and add explanations about what sharded queries are, etc. It's a bit difficult to fit that into our current error handling.
For now though this LGTM, i've left a couple small comments
pkg/querier/queryrange/limits.go
Outdated
limErrQuerierTooManyBytesShardableTmpl = "not shardable query too large to execute on a single querier: (query: %s, limit: %s). Consider adding more specific stream selectors or reduce the time range of the query" | ||
limErrQuerierTooManyBytesUnshardableTmpl = "shard query is too big to execute on a single querier: (query: %s, limit: %s). Consider adding more specific stream selectors or reduce the time range of 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.
I think these two might be mixed up, based on the name of the const
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 agree but I think it's the most representative name. What about limErrQuerierTooManyBytesUNshardableTmpl
, note the capital N
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.
What i mean is:
UnshardableTmpl
=> shard query is too big
ShardableTmpl
=> not shardable query too large
That seems backwards 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.
Gotcha. As Sandeep pointed out. Those were the other way around. Fixed now.
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.
LGTM with minor nits
pkg/querier/queryrange/limits.go
Outdated
limErrQuerierTooManyBytesShardableTmpl = "not shardable query too large to execute on a single querier: (query: %s, limit: %s). Consider adding more specific stream selectors or reduce the time range of the query" | ||
limErrQuerierTooManyBytesUnshardableTmpl = "shard query is too big to execute on a single querier: (query: %s, limit: %s). Consider adding more specific stream selectors or reduce the time range of 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.
I feel error messages are not aligning with the names of the variables
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.
Yes! Good catch.
pkg/querier/queryrange/limits.go
Outdated
requiredLabelsErrTmpl = "stream selector is missing required matchers [%s], labels present in the query were [%s]" | ||
limErrQueryTooManyBytesTmpl = "the query would read too many bytes (query: %s, limit: %s). Consider adding more specific stream selectors or reduce the time range of the query" | ||
limErrQuerierTooManyBytesTmpl = "query too large to execute on a single querier: (query: %s, limit: %s). Consider adding more specific stream selectors, reduce the time range of the query, or adjust parallelization settings" | ||
limErrQuerierTooManyBytesShardableTmpl = "not shardable query too large to execute on a single querier: (query: %s, limit: %s). Consider adding more specific stream selectors or reduce the time range of 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.
limErrQuerierTooManyBytesShardableTmpl = "not shardable query too large to execute on a single querier: (query: %s, limit: %s). Consider adding more specific stream selectors or reduce the time range of the query" | |
limErrQuerierTooManyBytesUnshardableTmpl = "un-shardable query too large to execute on a single querier: (query: %s, limit: %s). Consider adding more specific stream selectors or reducing the time range of 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.
Done
pkg/querier/queryrange/limits.go
Outdated
limErrQueryTooManyBytesTmpl = "the query would read too many bytes (query: %s, limit: %s). Consider adding more specific stream selectors or reduce the time range of the query" | ||
limErrQuerierTooManyBytesTmpl = "query too large to execute on a single querier: (query: %s, limit: %s). Consider adding more specific stream selectors, reduce the time range of the query, or adjust parallelization settings" | ||
limErrQuerierTooManyBytesShardableTmpl = "not shardable query too large to execute on a single querier: (query: %s, limit: %s). Consider adding more specific stream selectors or reduce the time range of the query" | ||
limErrQuerierTooManyBytesUnshardableTmpl = "shard query is too big to execute on a single querier: (query: %s, limit: %s). Consider adding more specific stream selectors or reduce the time range of 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.
limErrQuerierTooManyBytesUnshardableTmpl = "shard query is too big to execute on a single querier: (query: %s, limit: %s). Consider adding more specific stream selectors or reduce the time range of the query" | |
limErrQuerierTooManyBytesShardableTmpl = "sharded query too large to execute on a single querier: (query: %s, limit: %s). Consider adding more specific stream selectors or reducing the time range of 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.
Done
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.
LGTM with one more tiny nit, thanks!
Co-authored-by: Danny Kopping <[email protected]>
What this PR does / why we need it:
In #8670 we introduced a new limit
max_querier_bytes_read
. When the limit was surpassed the following error message is printed:As pointed out in this comment, a user would have a hard time figuring out whether the cause was
parallelization is not enabled
,the query is unshardable
ora shard query is too big to execute
.This PR improves the error messaging for the
max_querier_bytes_read
limit to raise a different error for each of the causes above.Which issue(s) this PR fixes:
Followup for #8670
Special notes for your reviewer:
Checklist
CONTRIBUTING.md
guide (required)CHANGELOG.md
updateddocs/sources/upgrading/_index.md