mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:14:12 +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) {
|
||||
mdbx_jitter4testing(true);
|
||||
if (likely(target != head)) {
|
||||
mdbx_meta_update_begin(env, target, pending->mm_txnid_top);
|
||||
#ifdef NDEBUG
|
||||
/* nodebug: 'invalidate' the meta to avoid false-reading
|
||||
* from violators (make safer) */
|
||||
/* LY: 'invalidate' the meta. */
|
||||
target->mm_datasync_sign = MDBX_DATASIGN_WEAK;
|
||||
mdbx_coherent_barrier();
|
||||
#else
|
||||
mdbx_meta_update_begin(env, target, pending->mm_txnid_top);
|
||||
#ifndef NDEBUG
|
||||
/* debug: provoke failure to catch a violators */
|
||||
memset(target->mm_dbs, 0xCC,
|
||||
sizeof(target->mm_dbs) + sizeof(target->mm_canary));
|
||||
|
Loading…
x
Reference in New Issue
Block a user