Skip to content

Commit 2cf8709

Browse files
committed
db: add missing logUnlock in some excise error paths
1 parent 6d59c06 commit 2cf8709

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ingest.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,6 +2101,7 @@ func (d *DB) ingestApply(
21012101
for m := range ls.Overlaps(d.cmp, exciseSpan.UserKeyBounds()).All() {
21022102
leftTable, rightTable, err := d.exciseTable(ctx, exciseSpan.UserKeyBounds(), m, layer.Level())
21032103
if err != nil {
2104+
d.mu.versions.logUnlock()
21042105
return nil, err
21052106
}
21062107
newFiles := applyExciseToVersionEdit(ve, m, leftTable, rightTable, layer.Level())
@@ -2113,6 +2114,7 @@ func (d *DB) ingestApply(
21132114
// For the same reasons as the above call to excise, we hold the db mutex
21142115
// while calling this method.
21152116
if err := d.ingestSplit(ctx, ve, updateLevelMetricsOnExcise, filesToSplit, replacedFiles); err != nil {
2117+
d.mu.versions.logUnlock()
21162118
return nil, err
21172119
}
21182120
}

0 commit comments

Comments
 (0)