mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-20 05:18:21 +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))
|
||||
goto bailout;
|
||||
}
|
||||
env->me_sync_pending += env->me_psize;
|
||||
mdbx_meta_set_txnid(env, &meta, mdbx_meta_txnid_stable(env, head) + 1);
|
||||
rc = mdbx_sync_locked(env, env->me_flags, &meta);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user