mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-29 09:38:49 +08:00
mdbx: fix copy&paste bug.
Resolves https://gitflic.ru/project/erthink/libmdbx/issue/5
This commit is contained in:
parent
caecdd1ac0
commit
5cd4190f2d
@ -5790,8 +5790,10 @@ static txnid_t mdbx_find_oldest(const MDBX_txn *txn) {
|
||||
mdbx_tassert(txn, edge <= txn->mt_txnid);
|
||||
|
||||
MDBX_lockinfo *const lck = env->me_lck_mmap.lck;
|
||||
if (unlikely(lck == NULL /* exclusive mode */))
|
||||
return atomic_store64(&lck->mti_oldest_reader, edge, mo_Relaxed);
|
||||
if (unlikely(lck == NULL /* exclusive mode */)) {
|
||||
mdbx_assert(env, env->me_lck == (void *)&env->x_lckless_stub);
|
||||
return env->me_lck->mti_oldest_reader.weak = edge;
|
||||
}
|
||||
|
||||
const txnid_t last_oldest =
|
||||
atomic_load64(&lck->mti_oldest_reader, mo_AcquireRelease);
|
||||
|
Loading…
x
Reference in New Issue
Block a user