diff --git a/tsdb/index/index.go b/tsdb/index/index.go index 8172b81ce..09fb737bf 100644 --- a/tsdb/index/index.go +++ b/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()