You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[doc] Clarify meaning of "crash" in transaction consistency guarantee #281
I have a question regarding the documentation, specifically this part:
"1,000,000 transactions in async-write mode. In case of a crash all data is consistent and conforms to the one of last successful transactions, but lost transaction count is much higher than in lazy-write mode. All DB engines in this mode do as little writes as possible on persistent storage. libmdbx uses msync(MS_ASYNC) in this mode."
Could you clarify what exactly is meant by "crash" in this context? Do you mean:
A process crash (e.g., the database process is terminated unexpectedly)?
A system crash (e.g., OS kernel panic or power loss)?
I ask because libmdbx in this mode uses msync(MS_ASYNC), which (as I understand it) ensures data is passed to the kernel page cache but does not guarantee it is flushed to persistent storage immediately. So in the case of a process crash, the data should still be safe, but in the case of a system crash or power failure, data loss could occur unless a stronger sync is used.
Could you confirm whether the "crash" here includes system-level crashes, or if it's limited to process-level failures?
After thinking about it, I decided to give an explanation, as apparently it's time to remove some information from the README due to obsolescence.
Most (or all) of slides that now within REAME was created/prepared about of 10 year ago for Highload++ conference. At that time, libmdbx differed relatively little from LMDB. The current version of libmdbx offers/supports a different set of sync-to-disk modes, so the slide descriptions are somewhat outdated.
Could you confirm whether the "crash" here includes system-level crashes, or if it's limited to process-level failures?
The noted "crash" mean a system crash (e.g. OS kernel panic or power loss), and your understanding is correct.
Activity
erthink commentedon May 10, 2025
I agree, the paragraph should be rewritten (it looks like some kind of not-a-good machine translation option has been preserved).
For now, please see the SYNC MODES and subordinary references, especially for
MDBX_SAFE_NOSYNCandMDBX_UTTERLY_NOSYNC.erthink commentedon May 12, 2025
After thinking about it, I decided to give an explanation, as apparently it's time to remove some information from the README due to obsolescence.
Most (or all) of slides that now within REAME was created/prepared about of 10 year ago for Highload++ conference. At that time, libmdbx differed relatively little from LMDB. The current version of libmdbx offers/supports a different set of sync-to-disk modes, so the slide descriptions are somewhat outdated.
The noted "crash" mean a system crash (e.g. OS kernel panic or power loss), and your understanding is correct.
mdbx-doc: clarify "crash" meaning.
erthink commentedon Aug 15, 2026
This topic has been included in the FAQ, and AI has already collected all the facts and explanations related to it.
mdbx-doc: clarify "crash" meaning (backport).
mdbx-doc: clarify "crash" meaning (backport).