mdbx: don't create steady-checkpoint for db-shrink in utterly-unsync mode without prev steady-points.

Change-Id: I1ec0d6cb9c31af0d151964d06d390ec247c2ac41
This commit is contained in:
Leonid Yuriev 2019-12-02 20:30:37 +03:00
parent 8b4be26ca1
commit 116a6a8cfe

View File

@ -7459,7 +7459,9 @@ static int mdbx_sync_locked(MDBX_env *env, unsigned flags,
const pgno_t bottom =
(aligned > pending->mm_geo.lower) ? aligned : pending->mm_geo.lower;
if (pending->mm_geo.now > bottom) {
flags &= MDBX_WRITEMAP | MDBX_SHRINK_ALLOWED; /* force steady */
if (META_IS_STEADY(mdbx_meta_steady(env)))
/* force steady, but only if steady-checkpoint is present */
flags &= MDBX_WRITEMAP | MDBX_SHRINK_ALLOWED;
shrink = pending->mm_geo.now - bottom;
pending->mm_geo.now = bottom;
if (mdbx_meta_txnid_stable(env, head) ==