Skip to content

Commit b647892

Browse files
fix: reduce unnecessary purger operations and logging (#26762)
Skip purger call if no TSM files are held open during a replace operation. Reduce useless log entries.
1 parent 7ca78d1 commit b647892

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tsdb/engine/tsm1/file_store.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,6 +1596,10 @@ type purger struct {
15961596

15971597
func (p *purger) add(files []TSMFile) {
15981598
var fileNames []string
1599+
1600+
if len(files) == 0 {
1601+
return
1602+
}
15991603
p.mu.Lock()
16001604
for _, f := range files {
16011605
fileName := f.Path()

0 commit comments

Comments
 (0)