mdbx: add MDBX_FAKE_SPILL_WRITEMAP build option.

Change-Id: I2c7f9267b0e725674b8bc73547bedd8478231948
This commit is contained in:
Leonid Yuriev
2021-04-26 18:18:51 +03:00
parent 4fa5e95241
commit 427b480f68
2 changed files with 19 additions and 3 deletions

View File

@@ -5109,9 +5109,6 @@ static int mdbx_txn_spill(MDBX_txn *txn, MDBX_cursor *m0, unsigned need) {
int rc = MDBX_SUCCESS;
if (txn->mt_flags & MDBX_WRITEMAP) {
MDBX_dpl *const dl = txn->tw.dirtylist;
#ifndef MDBX_FAKE_SPILL_WRITEMAP
#define MDBX_FAKE_SPILL_WRITEMAP 1
#endif
const unsigned span = dl->length - txn->tw.loose_count;
txn->tw.dirtyroom += span;
if (MDBX_FAKE_SPILL_WRITEMAP) {