Skip to content

Commit 36f982a

Browse files
committed
manifest: change panic to Fatalf
This panic causes an "unlock of unlocked mutex" panic on unwinding, which obscures the original panic. Change to a `Fatalf`. Fixes #5225
1 parent 01636b7 commit 36f982a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

db.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2795,7 +2795,7 @@ func (d *DB) rotateWAL() (newLogNum base.DiskFileNum, prevLogSize uint64) {
27952795
if err != nil {
27962796
// What to do here? Stumbling on doesn't seem worthwhile. If we failed to
27972797
// close the previous log it is possible we lost a write.
2798-
panic(err)
2798+
d.opts.Logger.Fatalf("pebble: error closing WAL; data loss possible if we continue: %s", err)
27992799
}
28002800
prevLogSize = uint64(offset)
28012801
metrics := d.mu.log.writer.Metrics()

0 commit comments

Comments
 (0)