mdbx-doc: add and describe MDBX_SYNC_DURABLE.

Change-Id: Id51e8c764a073e7c502d8d0b95ace0e14510e85b
This commit is contained in:
Leonid Yuriev 2020-09-07 12:30:50 +03:00
parent f393ae1c51
commit 64e35a1e44

16
mdbx.h
View File

@ -972,13 +972,25 @@ enum MDBX_env_flags_t {
* be written to disk, while the itself B-tree not yet. In that case, the
* database will be corrupted!
*
* \see MDBX_NOMETASYNC \see MDBX_SAFE_NOSYNC \see MDBX_UTTERLY_NOSYNC
* \see MDBX_SYNC_DURABLE \see MDBX_NOMETASYNC \see MDBX_SAFE_NOSYNC
* \see MDBX_UTTERLY_NOSYNC
*
* @{ */
/** Default robust and durable sync mode.
*
* Metadata is written and flushed to disk after a data is written and
* flushed, which guarantees the integrity of the database in the event
* of a crash at any time.
*
* \attention Please do not use other modes until you have studied all the
* details and are sure. Otherwise, you may lose your users' data, as happens
* in [Miranda NG](https://www.miranda-ng.org/) messenger. */
MDBX_SYNC_DURABLE = 0,
/** Don't sync the meta-page after commit.
*
* Flush system buffers to disk only once per transaction, omit the
* Flush system buffers to disk only once per transaction commit, omit the
* metadata flush. Defer that until the system flushes files to disk,
* or next non-\ref MDBX_RDONLY commit or \ref mdbx_env_sync(). Depending on
* the platform and hardware, with \ref MDBX_NOMETASYNC you may get a doubling