From 8e8b40e7a2bddb878f84f991e47c550662c75f7a Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Tue, 18 Sep 2018 20:50:47 +0300 Subject: [PATCH] mdbx: fix update_gc() assertion. Change-Id: I433382de0ddab41ad1530ee674ed22f9003c2779 --- src/mdbx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mdbx.c b/src/mdbx.c index d21b70eb..1351cdb4 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -4013,7 +4013,9 @@ retry: /* LY: freedb is empty, will look any free txn-id in high2low order. */ do { --head_gc_id; - mdbx_assert(env, MDBX_PNL_LAST(txn->mt_lifo_reclaimed) > head_gc_id); + mdbx_assert(env, + MDBX_PNL_IS_EMPTY(txn->mt_lifo_reclaimed) || + MDBX_PNL_LAST(txn->mt_lifo_reclaimed) > head_gc_id); rc = mdbx_txl_append(&txn->mt_lifo_reclaimed, head_gc_id); if (unlikely(rc != MDBX_SUCCESS)) goto bailout;