https://bugs.openldap.org/show_bug.cgi?id=10552
--- Comment #7 from donxenapo@gmail.com --- We have deployed LMDB v1.0.0 from the current tag, and unfortunately looks like the corruption has not stopped. We added code that recreates the database once a corruption is detected, which lowered our crash rate pretty substantially, but the crashes are still there, mostly with
Error: MDB_PAGE_NOTFOUND: Requested page not found Error: MDB_PROBLEM: Unexpected problem - txn should abort etc
We got a couple user reports that at least some of these crashes happen right after they got a BSOD or a reboot, so looks like there is a higher chance to corrupt the database during an abnormal system shutdown.
One relevant flag we're using here is MDB_NOMETASYNC:
const auto error = mdb_env_open(env.get(), location.c_str(), MDB_NOMETASYNC, 0644);
and from what I understand, LMDB is supposed to handle abnormal shutdowns gracefully with this flag?
We have never reproduced this issue in-house, but in the wild it's in the top 10 of our crashes.