mdbx: использование txl_contain() в audit().

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2025-01-07 19:34:06 +03:00
parent faa9753d2d
commit b00e8ea13f

View File

@ -46,11 +46,7 @@ __cold static int audit_ex_locked(MDBX_txn *txn, size_t retired_stored, bool don
return MDBX_CORRUPTED; return MDBX_CORRUPTED;
} }
txnid_t id = unaligned_peek_u64(4, key.iov_base); txnid_t id = unaligned_peek_u64(4, key.iov_base);
if (txn->tw.gc.retxl) { if (txn->tw.gc.retxl ? txl_contain(txn->tw.gc.retxl, id) : (id <= txn->tw.gc.last_reclaimed))
for (size_t i = 1; i <= MDBX_PNL_GETSIZE(txn->tw.gc.retxl); ++i)
if (id == txn->tw.gc.retxl[i])
goto skip;
} else if (id <= txn->tw.gc.last_reclaimed)
goto skip; goto skip;
} }
gc += *(pgno_t *)data.iov_base; gc += *(pgno_t *)data.iov_base;