mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
Merge pull request #14103 from krajorama/handle-context-cancel-in-postingsformatcher
tsdb/index/postings: fix missing lock unlock
This commit is contained in:
commit
179163a4c6
|
@ -419,6 +419,7 @@ func (p *MemPostings) PostingsForLabelMatching(ctx context.Context, name string,
|
||||||
count := 1
|
count := 1
|
||||||
for _, v := range vals {
|
for _, v := range vals {
|
||||||
if count%checkContextEveryNIterations == 0 && ctx.Err() != nil {
|
if count%checkContextEveryNIterations == 0 && ctx.Err() != nil {
|
||||||
|
p.mtx.RUnlock()
|
||||||
return ErrPostings(ctx.Err())
|
return ErrPostings(ctx.Err())
|
||||||
}
|
}
|
||||||
count++
|
count++
|
||||||
|
|
Loading…
Reference in a new issue