mirror of
https://github.com/isar/libmdbx.git
synced 2025-04-28 07:42:26 +08:00
mdbx: fix assertion (minor, not a malfunction).
The `env->me_sync_pending` could be zero when `mdbx_sync_locked()` called from `mdbx_env_set_geometry()`. Therefore `mdbx_assert(env, !META_IS_STEADY(head) || env->me_sync_pending != 0)` at the top of `mdbx_sync_locked()` could be trigger assertion failure.
This commit is contained in:
parent
e68cce8412
commit
46a3d4e0a3
@ -4651,6 +4651,7 @@ LIBMDBX_API int mdbx_env_set_geometry(MDBX_env *env, intptr_t size_lower,
|
|||||||
if (unlikely(rc != MDBX_SUCCESS))
|
if (unlikely(rc != MDBX_SUCCESS))
|
||||||
goto bailout;
|
goto bailout;
|
||||||
}
|
}
|
||||||
|
env->me_sync_pending += env->me_psize;
|
||||||
mdbx_meta_set_txnid(env, &meta, mdbx_meta_txnid_stable(env, head) + 1);
|
mdbx_meta_set_txnid(env, &meta, mdbx_meta_txnid_stable(env, head) + 1);
|
||||||
rc = mdbx_sync_locked(env, env->me_flags, &meta);
|
rc = mdbx_sync_locked(env, env->me_flags, &meta);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user