tsdb/index/postings: fix missing lock unlock
Followup to #14096 Unfortunately the previous PR introduced this bug by not releasing the lock before returning. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
This commit is contained in:
parent
fdaafdb041
commit
b215a41be4
|
@ -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