From c554b5c45d56148d941d97b3dae6fac8bb957492 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Thu, 19 Dec 2019 22:49:54 +0300 Subject: [PATCH] mdbx: move toggle of readers-refresh to sync_locked(). Change-Id: I99adf32fb39d600a37c4b25f7e8ea49e5bac6cf0 --- src/elements/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/elements/core.c b/src/elements/core.c index 230ff11a..9a90c3da 100644 --- a/src/elements/core.c +++ b/src/elements/core.c @@ -7071,8 +7071,6 @@ int mdbx_txn_commit(MDBX_txn *txn) { goto fail; } - if (likely(env->me_lck)) - env->me_lck->mti_readers_refresh_flag = false; end_mode = MDBX_END_COMMITTED | MDBX_END_UPDATE | MDBX_END_EOTDONE; done: @@ -7716,6 +7714,10 @@ static int mdbx_sync_locked(MDBX_env *env, unsigned flags, goto fail; } + if (likely(env->me_lck)) + /* toggle oldest refresh */ + env->me_lck->mti_readers_refresh_flag = false; + return MDBX_SUCCESS; fail: