Skip to content

Commit eb5acd8

Browse files
authored
feat: TagValueIterator holds RLock for too long (#26369) (#26414)
1 parent 0d44e81 commit eb5acd8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tsdb/index/tsi1/log_file.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,17 +418,19 @@ func (f *LogFile) TagValue(name, key, value []byte) TagValueElem {
418418
// TagValueIterator returns a value iterator for a tag key.
419419
func (f *LogFile) TagValueIterator(name, key []byte) TagValueIterator {
420420
f.mu.RLock()
421-
defer f.mu.RUnlock()
422421

423422
mm, ok := f.mms[string(name)]
424423
if !ok {
424+
f.mu.RUnlock()
425425
return nil
426426
}
427427

428428
tk, ok := mm.tagSet[string(key)]
429429
if !ok {
430+
f.mu.RUnlock()
430431
return nil
431432
}
433+
f.mu.RUnlock()
432434
return tk.TagValueIterator()
433435
}
434436

0 commit comments

Comments
 (0)