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:
Leo Yuriev 2017-12-18 14:39:41 +03:00
parent e68cce8412
commit 46a3d4e0a3

View File

@ -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);
}