mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
fix check context cancellation not incrementing count
Signed-off-by: Ben Ye <benye@amazon.com>
This commit is contained in:
parent
4c1e71fa0b
commit
e7db2e30a4
|
@ -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…
Reference in a new issue