mdbx-chk: allow gap for GC's PNL upto half of page.

Change-Id: I6d6d68d1124c336f8356435eba02cb66a08c4e9c
This commit is contained in:
Leonid Yuriev 2018-09-18 22:31:39 +03:00
parent c4e1c2b488
commit b52e878c4f

View File

@ -421,7 +421,9 @@ static int handle_freedb(const uint64_t record_number, const MDBX_val *key,
(number + 1) * sizeof(pgno_t), data->iov_len);
number = data->iov_len / sizeof(pgno_t) - 1;
} else if (data->iov_len - (number + 1) * sizeof(pgno_t) >
sizeof(pgno_t) * 2)
/* LY: allow gap upto half of page. it is ok
* and better than shink-and-retry inside mdbx_update_gc() */
envstat.ms_psize / 2)
problem_add("entry", record_number, "extra idl space",
"%" PRIuSIZE " < %" PRIuSIZE " (minor, not a trouble)",
(number + 1) * sizeof(pgno_t), data->iov_len);