mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-29 23:12:35 +08:00
mdbx-chk: allow gap for GC's PNL upto one page.
Change-Id: Ie051442947e7588b868cec35ef9374368bf8a1c4
This commit is contained in:
@@ -420,10 +420,10 @@ static int handle_freedb(const uint64_t record_number, const MDBX_val *key,
|
||||
"%" PRIuSIZE " > %" PRIuSIZE " (corruption)",
|
||||
(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) >
|
||||
/* LY: allow gap upto half of page. it is ok
|
||||
} else if (data->iov_len - (number + 1) * sizeof(pgno_t) >=
|
||||
/* LY: allow gap upto one page. it is ok
|
||||
* and better than shink-and-retry inside mdbx_update_gc() */
|
||||
envstat.ms_psize / 2)
|
||||
envstat.ms_psize)
|
||||
problem_add("entry", record_number, "extra idl space",
|
||||
"%" PRIuSIZE " < %" PRIuSIZE " (minor, not a trouble)",
|
||||
(number + 1) * sizeof(pgno_t), data->iov_len);
|
||||
|
Reference in New Issue
Block a user