mdbx: minor refine CC_RETIRING handling.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-07-04 21:57:42 +03:00
parent ca3f188370
commit 6eefa05f3d

View File

@ -18240,11 +18240,12 @@ __cold static int mdbx_page_check(MDBX_cursor *const mc,
unlikely(ksize != 0)) unlikely(ksize != 0))
rc = bad_page(mp, "branch-node[%u] wrong 0-node key-length (%zu)\n", rc = bad_page(mp, "branch-node[%u] wrong 0-node key-length (%zu)\n",
i, ksize); i, ksize);
if ((mc->mc_checking & CC_RETIRING) == 0) { const pgno_t ref = node_pgno(node);
const pgno_t ref = node_pgno(node); if (unlikely(ref < MIN_PAGENO) ||
if (unlikely(ref < MIN_PAGENO || ref >= mc->mc_txn->mt_next_pgno)) (unlikely(ref >= mc->mc_txn->mt_next_pgno) &&
rc = bad_page(mp, "branch-node[%u] wrong pgno (%u)\n", i, ref); (unlikely(ref >= mc->mc_txn->mt_geo.now) ||
} !(mc->mc_checking & CC_RETIRING))))
rc = bad_page(mp, "branch-node[%u] wrong pgno (%u)\n", i, ref);
if (unlikely(node_flags(node))) if (unlikely(node_flags(node)))
rc = bad_page(mp, "branch-node[%u] wrong flags (%u)\n", i, rc = bad_page(mp, "branch-node[%u] wrong flags (%u)\n", i,
node_flags(node)); node_flags(node));