Skip to content

Commit

Permalink
querier: Actually use select mint,maxt params during select.
Browse files Browse the repository at this point in the history
This will definitely helps with offset queries.

Same was done on cortexproject/cortex#1012

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
  • Loading branch information
bwplotka committed Oct 22, 2019
1 parent 5bfe54e commit 0e8862f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/query/querier.go
Expand Up @@ -169,12 +169,18 @@ func (q *querier) Select(params *storage.SelectParams, ms ...*labels.Matcher) (s
return nil, nil, errors.Wrap(err, "convert matchers")
}

if params == nil {
params = &storage.SelectParams{
Start: q.mint,
End: q.maxt,
}
}
queryAggrs, resAggr := aggrsFromFunc(params.Func)

resp := &seriesServer{ctx: ctx}
if err := q.proxy.Series(&storepb.SeriesRequest{
MinTime: q.mint,
MaxTime: q.maxt,
MinTime: params.Start,
MaxTime: params.End,
Matchers: sms,
MaxResolutionWindow: q.maxResolutionMillis,
Aggregates: queryAggrs,
Expand Down

0 comments on commit 0e8862f

Please sign in to comment.