Skip to content

Commit

Permalink
Fail through to next middleware when querySizeLimit cannot be applied (
Browse files Browse the repository at this point in the history
…grafana#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 <[email protected]>
  • Loading branch information
trevorwhitney and owen-d authored Apr 5, 2023
1 parent e001086 commit c587b53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/querier/queryrange/limits.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
return q.next.Do(ctx, r)
}
if schemaCfg.IndexType != config.TSDBType {
return q.next.Do(ctx, r)
Expand Down

0 comments on commit c587b53

Please sign in to comment.