Check for timeout in each iteration of matrixSelector (#4300)
Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com> Fixes #4288
This commit is contained in:
parent
78e0784d04
commit
a6dace8829
|
@ -1044,6 +1044,9 @@ func (ev *evaluator) matrixSelector(node *MatrixSelector) Matrix {
|
|||
|
||||
var it *storage.BufferedSeriesIterator
|
||||
for i, s := range node.series {
|
||||
if err := contextDone(ev.ctx, "expression evaluation"); err != nil {
|
||||
ev.error(err)
|
||||
}
|
||||
if it == nil {
|
||||
it = storage.NewBuffer(s.Iterator(), durationMilliseconds(node.Range))
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue