Skip to content

Commit e51acc4

Browse files
authored
feat: TagValueIterator holds RLock for too long (#26369) (#26372) (#26853)
1 parent 21ab484 commit e51acc4

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
@@ -421,17 +421,19 @@ func (f *LogFile) TagValue(name, key, value []byte) TagValueElem {
421421
// TagValueIterator returns a value iterator for a tag key.
422422
func (f *LogFile) TagValueIterator(name, key []byte) TagValueIterator {
423423
f.mu.RLock()
424-
defer f.mu.RUnlock()
425424

426425
mm, ok := f.mms[string(name)]
427426
if !ok {
427+
f.mu.RUnlock()
428428
return nil
429429
}
430430

431431
tk, ok := mm.tagSet[string(key)]
432432
if !ok {
433+
f.mu.RUnlock()
433434
return nil
434435
}
436+
f.mu.RUnlock()
435437
return tk.TagValueIterator()
436438
}
437439

0 commit comments

Comments
 (0)