mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 18:44:13 +08:00
mdbx: fix without-LCK (exclusive + readonly) mode.
This commit is contained in:
parent
f6db64bea1
commit
e795fe7c3e
@ -20144,6 +20144,7 @@ __cold static int fetch_envinfo_ex(const MDBX_env *env, const MDBX_txn *txn,
|
|||||||
|
|
||||||
arg->mi_self_latter_reader_txnid = arg->mi_latter_reader_txnid =
|
arg->mi_self_latter_reader_txnid = arg->mi_latter_reader_txnid =
|
||||||
arg->mi_recent_txnid;
|
arg->mi_recent_txnid;
|
||||||
|
if (env->me_lck_mmap.lck) {
|
||||||
for (unsigned i = 0; i < arg->mi_numreaders; ++i) {
|
for (unsigned i = 0; i < arg->mi_numreaders; ++i) {
|
||||||
const uint32_t pid =
|
const uint32_t pid =
|
||||||
atomic_load32(&lck->mti_readers[i].mr_pid, mo_AcquireRelease);
|
atomic_load32(&lck->mti_readers[i].mr_pid, mo_AcquireRelease);
|
||||||
@ -20155,6 +20156,7 @@ __cold static int fetch_envinfo_ex(const MDBX_env *env, const MDBX_txn *txn,
|
|||||||
arg->mi_self_latter_reader_txnid = txnid;
|
arg->mi_self_latter_reader_txnid = txnid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mdbx_compiler_barrier();
|
mdbx_compiler_barrier();
|
||||||
return MDBX_SUCCESS;
|
return MDBX_SUCCESS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user