mdbx: avoid single-page (too small) shrink threshold by default when MDBX_DEBUG > 0.

This commit is contained in:
Leonid Yuriev 2021-10-05 12:55:23 +03:00
parent f936217309
commit fa0a38c1ac

View File

@ -11058,11 +11058,12 @@ mdbx_env_set_geometry(MDBX_env *env, intptr_t size_lower, intptr_t size_now,
(env->me_txn0 && env->me_txn0->mt_owner == mdbx_thread_self());
#if MDBX_DEBUG
if (growth_step < 0)
if (growth_step < 0) {
growth_step = 1;
if (shrink_threshold < 0)
shrink_threshold = 1;
#endif
if (shrink_threshold < 0)
shrink_threshold = 1;
}
#endif /* MDBX_DEBUG */
intptr_t reasonable_maxsize = 0;
bool need_unlock = false;