From 37867a0b84f1d75042b4f4f943093d980d183001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Thu, 29 Dec 2022 14:10:39 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D0=BD=D0=B5=20=D0=BE=D0=B1=D1=85=D0=BE?= =?UTF-8?q?=D0=B4=D0=B8=D0=BC=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA?= =?UTF-8?q?=D1=83=20=D0=BA=D0=BE=D0=B3=D0=B5=D1=80=D0=B5=D0=BD=D1=82=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D0=B8=20=D0=B2=20=D1=80=D0=B5=D0=B6=D0=B8?= =?UTF-8?q?=D0=BC=D0=B5=20=D0=B2=D0=BE=D1=81=D1=81=D1=82=D0=B0=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core.c b/src/core.c index bc5021a6..f3a1d765 100644 --- a/src/core.c +++ b/src/core.c @@ -8782,9 +8782,8 @@ static int txn_renew(MDBX_txn *txn, const unsigned flags) { memcpy(txn->mt_dbs, head.ptr_c->mm_dbs, CORE_DBS * sizeof(MDBX_db)); txn->mt_canary = head.ptr_v->mm_canary; - if (unlikely(env->me_stuck_meta >= 0)) - break; - if (unlikely(meta_should_retry(env, &troika) || + if (likely(env->me_stuck_meta < 0) && + unlikely(meta_should_retry(env, &troika) || head.txnid < atomic_load64(&env->me_lck->mti_oldest_reader, mo_AcquireRelease))) { if (unlikely(++loop > 42)) {