mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 19:14:14 +08:00
mdbx: refine meta-commit in WRITEMAP mode.
Change-Id: Ieb53bf6144a104fc88b0b07b4abdde20f4b01978
This commit is contained in:
parent
2347282b4f
commit
fca74ab80c
@ -3661,13 +3661,10 @@ static int mdbx_sync_locked(MDBX_env *env, unsigned flags,
|
|||||||
if (env->me_flags & MDBX_WRITEMAP) {
|
if (env->me_flags & MDBX_WRITEMAP) {
|
||||||
mdbx_jitter4testing(true);
|
mdbx_jitter4testing(true);
|
||||||
if (likely(target != head)) {
|
if (likely(target != head)) {
|
||||||
mdbx_meta_update_begin(env, target, pending->mm_txnid_top);
|
/* LY: 'invalidate' the meta. */
|
||||||
#ifdef NDEBUG
|
|
||||||
/* nodebug: 'invalidate' the meta to avoid false-reading
|
|
||||||
* from violators (make safer) */
|
|
||||||
target->mm_datasync_sign = MDBX_DATASIGN_WEAK;
|
target->mm_datasync_sign = MDBX_DATASIGN_WEAK;
|
||||||
mdbx_coherent_barrier();
|
mdbx_meta_update_begin(env, target, pending->mm_txnid_top);
|
||||||
#else
|
#ifndef NDEBUG
|
||||||
/* debug: provoke failure to catch a violators */
|
/* debug: provoke failure to catch a violators */
|
||||||
memset(target->mm_dbs, 0xCC,
|
memset(target->mm_dbs, 0xCC,
|
||||||
sizeof(target->mm_dbs) + sizeof(target->mm_canary));
|
sizeof(target->mm_dbs) + sizeof(target->mm_canary));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user