-
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
Fail through to next middleware when querySizeLimit cannot be applied #9050
Fail through to next middleware when querySizeLimit cannot be applied #9050
Conversation
* When the query size limiter can't limit the query, fail through to the next middleware instead of erroring. This can happen, for example, when a query spans schemas.
Hello @trevorwhitney!
Please, if the current pull request addresses a bug fix, label it with the |
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, lgtm
Co-authored-by: Owen Diehl <ow.diehl@gmail.com>
…#9050) **What this PR does / why we need it**: When the query size limiter can't limit the query, fail through to the next middleware instead of erroring. This can happen, for example, when a query spans schemas, which is still a valid query case, so we want to make sure to fall back to existing behavior. --------- Co-authored-by: Owen Diehl <ow.diehl@gmail.com> (cherry picked from commit c587b53)
@@ -353,7 +353,8 @@ func (q *querySizeLimiter) Do(ctx context.Context, r queryrangebase.Request) (qu | |||
// Only support TSDB | |||
schemaCfg, err := q.getSchemaCfg(r) | |||
if err != nil { | |||
return nil, httpgrpc.Errorf(http.StatusInternalServerError, "Failed to get schema config: %s", err.Error()) | |||
level.Error(log).Log("msg", "failed to get schema config, not applying querySizeLimit", "err", err) |
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 this should be a warning level.
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.
addressed: #13029
What this PR does / why we need it:
When the query size limiter can't limit the query, fail through to the next middleware instead of erroring. This can happen, for example, when a query spans schemas, which is still a valid query case, so we want to make sure to fall back to existing behavior.