-
Notifications
You must be signed in to change notification settings - Fork 124
Description
Hi, thanks for your great work on libmdbx!
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?
Thanks a lot in advance!