From 943bb552a25f7f7c6cc16db5774bd170ff001a13 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Tue, 26 Jan 2021 10:28:39 +0300 Subject: [PATCH] mdbx: fix GC-slot cleanup inside `mdbx_update_gc()` in extra rare complex cases. More for https://github.com/erthink/libmdbx/commit/5f1b6847195c8e2587c891537e82a72db9937800 and https://github.com/erthink/libmdbx/issues/123 Change-Id: I1b78d6be2babf9ffdd0b77e7b1ee53d1313977bb --- src/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core.c b/src/core.c index ad6c779d..227ee61d 100644 --- a/src/core.c +++ b/src/core.c @@ -8080,8 +8080,10 @@ retry_noaccount: goto bailout; if (MDBX_PNL_SIZE(txn->tw.lifo_reclaimed)) { - if (need_cleanup) + if (need_cleanup) { mdbx_txl_sort(txn->tw.lifo_reclaimed); + cleaned_gc_slot = 0; + } gc_rid = MDBX_PNL_LAST(txn->tw.lifo_reclaimed); } else { mdbx_tassert(txn, txn->tw.last_reclaimed == 0);