mdbx: move toggle of readers-refresh to sync_locked().

Change-Id: I99adf32fb39d600a37c4b25f7e8ea49e5bac6cf0
This commit is contained in:
Leonid Yuriev 2019-12-19 22:49:54 +03:00
parent 0350fc41f8
commit c554b5c45d

View File

@ -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: