From 46eb178f07c655fd9c29123a4ef95bca7c517bb8 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sat, 22 Jun 2019 01:29:45 +0300 Subject: [PATCH] mdbx: backport - fix GC corruption due deep recursive rebalance from update_gc(). Change-Id: I810250deb25cd625e737000282b434e3158ef8cc --- src/mdbx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mdbx.c b/src/mdbx.c index 0b2bfd82..0f1d89c5 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -3885,7 +3885,9 @@ retry: data.iov_len = (chunk + 1) * sizeof(pgno_t); mdbx_trace("%s.reserve: %u [%u...%u] @%" PRIaTXN, dbg_prefix_mode, chunk, settled + 1, settled + chunk + 1, reservation_gc_id); + mc.mc_flags |= C_RECLAIMING; rc = mdbx_cursor_put(&mc, &key, &data, MDBX_RESERVE | MDBX_NOOVERWRITE); + mc.mc_flags -= C_RECLAIMING; mdbx_tassert(txn, mdbx_pnl_check(env->me_reclaimed_pglist)); if (unlikely(rc != MDBX_SUCCESS)) goto bailout;