Skip to content

Commit

Permalink
levels: Cleanup builder resources on building an empty table hypermod…
Browse files Browse the repository at this point in the history
…einc#1414

Signed-off-by: thomassong <[email protected]>
  • Loading branch information
mYmNeo committed Sep 4, 2024
1 parent 8bbce30 commit 574aa37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions levels.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,9 @@ nextTable:
s.kv.opt.Debugf("LOG Compact. Added %d keys. Skipped %d keys. Iteration took: %v",
numKeys, numSkips, time.Since(timeStart))
if builder.Empty() {
// Cleanup builder resources:
builder.Finish()
builder.Close()
continue
}
numBuilds++
Expand Down

0 comments on commit 574aa37

Please sign in to comment.