Browse Source

Check for timeout in each iteration of matrixSelector (#4300)

Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes #4288
pull/4306/head
Thomas Jackson 7 years ago committed by Brian Brazil
parent
commit
a6dace8829
  1. 3
      promql/engine.go

3
promql/engine.go

@ -1044,6 +1044,9 @@ func (ev *evaluator) matrixSelector(node *MatrixSelector) Matrix {
var it *storage.BufferedSeriesIterator var it *storage.BufferedSeriesIterator
for i, s := range node.series { for i, s := range node.series {
if err := contextDone(ev.ctx, "expression evaluation"); err != nil {
ev.error(err)
}
if it == nil { if it == nil {
it = storage.NewBuffer(s.Iterator(), durationMilliseconds(node.Range)) it = storage.NewBuffer(s.Iterator(), durationMilliseconds(node.Range))
} else { } else {

Loading…
Cancel
Save