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
|
||||
for _, v := range vals {
|
||||
if count%checkContextEveryNIterations == 0 && ctx.Err() != nil {
|
||||
p.mtx.RUnlock()
|
||||
return ErrPostings(ctx.Err())
|
||||
}
|
||||
count++
|
||||
|
|
Loading…
Reference in New Issue