From e7db2e30a41b71e21f2477c0a756884bfba4579f Mon Sep 17 00:00:00 2001 From: Ben Ye Date: Sat, 15 Jun 2024 11:43:26 -0700 Subject: [PATCH] fix check context cancellation not incrementing count Signed-off-by: Ben Ye --- tsdb/index/index.go | 1 + 1 file changed, 1 insertion(+) 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()