mdbx: add MDBX_TXN_RDONLY_PREPARE.

Change-Id: I95647d1679b69d1e97514a45f20d7373174244d5
This commit is contained in:
Leonid Yuriev
2020-08-03 12:56:57 +03:00
parent 1e7a1da14e
commit 87de3fc25f
3 changed files with 47 additions and 30 deletions

8
mdbx.h
View File

@@ -1010,6 +1010,14 @@ enum MDBX_txn_flags_t {
* block each other and a write transactions. */
MDBX_TXN_RDONLY = MDBX_RDONLY,
/** Prepare but not start readonly transaction.
*
* Transaction will not be started immediately, but created transaction handle
* will be ready for use with \ref mdbx_txn_renew(). This flag allows to
* preallocate memory and assign a reader slot, thus avoiding these operations
* at the next start of the transaction. */
MDBX_TXN_RDONLY_PREPARE = MDBX_TXN_RDONLY | MDBX_NOMEMINIT,
/** Do not block when starting a write transaction. */
MDBX_TXN_TRY = UINT32_C(0x10000000),