mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 18:54:14 +08:00
mdbx: don't limit reclaimed-pglist if DB full.
More for 55d190bad9723fd9766466005b1a14e70779fc89 and https://github.com/erthink/libmdbx/issues/123 Change-Id: Iecd19fe8f159d29a1434d03f43f0b277f2d6ab86
This commit is contained in:
parent
d9ceb84445
commit
70241e25db
@ -5261,9 +5261,12 @@ skip_cache:
|
|||||||
}
|
}
|
||||||
const unsigned gc_len = MDBX_PNL_SIZE(gc_pnl);
|
const unsigned gc_len = MDBX_PNL_SIZE(gc_pnl);
|
||||||
/* TODO: provide a user-configurable threshold */
|
/* TODO: provide a user-configurable threshold */
|
||||||
const unsigned threshold_2_stop_gc_reclaiming = MDBX_PNL_MAX / 2;
|
const unsigned threshold_2_stop_gc_reclaiming = MDBX_PNL_MAX / 4;
|
||||||
if (unlikely(gc_len + MDBX_PNL_SIZE(txn->tw.reclaimed_pglist) >
|
if (unlikely(gc_len + MDBX_PNL_SIZE(txn->tw.reclaimed_pglist) >
|
||||||
threshold_2_stop_gc_reclaiming)) {
|
threshold_2_stop_gc_reclaiming) &&
|
||||||
|
(pgno_add(txn->mt_next_pgno, num) <= txn->mt_geo.upper ||
|
||||||
|
gc_len + MDBX_PNL_SIZE(txn->tw.reclaimed_pglist) >=
|
||||||
|
MDBX_PNL_MAX / 16 * 15)) {
|
||||||
/* Stop reclaiming to avoid overflow the page list.
|
/* Stop reclaiming to avoid overflow the page list.
|
||||||
* This is a rare case while search for a continuously multi-page region
|
* This is a rare case while search for a continuously multi-page region
|
||||||
* in a large database. https://github.com/erthink/libmdbx/issues/123 */
|
* in a large database. https://github.com/erthink/libmdbx/issues/123 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user