Browse Source

fix check context cancellation not incrementing count

Signed-off-by: Ben Ye <benye@amazon.com>
pull/14302/head
Ben Ye 5 months ago
parent
commit
e7db2e30a4
  1. 1
      tsdb/index/index.go

1
tsdb/index/index.go

@ -1557,6 +1557,7 @@ func (r *Reader) LabelNamesFor(ctx context.Context, postings Postings) ([]string
i := 0
for postings.Next() {
id := postings.At()
i++
if i%checkContextEveryNIterations == 0 && ctx.Err() != nil {
return nil, ctx.Err()

Loading…
Cancel
Save