mirror of
https://github.com/isar/libmdbx.git
synced 2025-05-15 17:47:45 +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_tassert(txn, edge <= txn->mt_txnid);
|
||||||
|
|
||||||
MDBX_lockinfo *const lck = env->me_lck_mmap.lck;
|
MDBX_lockinfo *const lck = env->me_lck_mmap.lck;
|
||||||
if (unlikely(lck == NULL /* exclusive mode */))
|
if (unlikely(lck == NULL /* exclusive mode */)) {
|
||||||
return atomic_store64(&lck->mti_oldest_reader, edge, mo_Relaxed);
|
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 =
|
const txnid_t last_oldest =
|
||||||
atomic_load64(&lck->mti_oldest_reader, mo_AcquireRelease);
|
atomic_load64(&lck->mti_oldest_reader, mo_AcquireRelease);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user