mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: allow GC's PNL be partially unused.
This commit is contained in:
parent
6fb628d88d
commit
64fb9b81f3
@ -2375,7 +2375,7 @@ static int mdbx_page_alloc(MDBX_cursor *mc, unsigned num, MDBX_page **mp,
|
||||
/* Append PNL from FreeDB record to me_reclaimed_pglist */
|
||||
mdbx_cassert(mc, (mc->mc_flags & C_GCFREEZE) == 0);
|
||||
pgno_t *re_pnl = (pgno_t *)data.iov_base;
|
||||
mdbx_tassert(txn, data.iov_len == MDBX_PNL_SIZEOF(re_pnl));
|
||||
mdbx_tassert(txn, data.iov_len >= MDBX_PNL_SIZEOF(re_pnl));
|
||||
mdbx_tassert(txn, mdbx_pnl_check(re_pnl, false));
|
||||
repg_pos = MDBX_PNL_SIZE(re_pnl);
|
||||
if (!repg_list) {
|
||||
|
@ -420,7 +420,8 @@ 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 ((number + 1) * sizeof(pgno_t) < data->iov_len)
|
||||
} else if (data->iov_len - (number + 1) * sizeof(pgno_t) >
|
||||
sizeof(pgno_t) * 2)
|
||||
problem_add("entry", record_number, "extra idl space",
|
||||
"%" PRIuSIZE " < %" PRIuSIZE " (minor, not a trouble)",
|
||||
(number + 1) * sizeof(pgno_t), data->iov_len);
|
||||
|
Loading…
Reference in New Issue
Block a user