cberner / redb

An embedded key-value database in pure Rust
https://www.redb.org
Apache License 2.0
3.38k stars 157 forks source link

Panic isn't a clean shutdown #885

Closed mconst closed 4 weeks ago

mconst commented 4 weeks ago

When shutting down due to a panic, don't mark the database as clean; just treat it like a crash and let the recovery code run next time. This avoids page leaks and possibly other database corruption, depending on where the panic happens.