From e518edcfedf1b04669e02616b5dcb04a9d2de2be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Tue, 15 Nov 2022 16:12:30 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D1=83=D0=BD=D0=B8=D1=84=D0=B8=D1=86?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=B8=D0=BD?= =?UTF-8?q?=D0=B8=D1=86=D0=B8=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B8=20`mp=5Ftxnid`=20=D0=B2=D0=BD=D1=83=D1=82=D1=80=D0=B8=20?= =?UTF-8?q?`page=5Fdirty()`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core.c b/src/core.c index cf34a1a2..8f4c12f3 100644 --- a/src/core.c +++ b/src/core.c @@ -5484,6 +5484,7 @@ __cold static pgno_t find_largest_snapshot(const MDBX_env *env, __hot static int __must_check_result page_dirty(MDBX_txn *txn, MDBX_page *mp, pgno_t npages) { tASSERT(txn, (txn->mt_flags & MDBX_TXN_RDONLY) == 0); + mp->mp_txnid = txn->mt_front; if (!txn->tw.dirtylist) { tASSERT(txn, (txn->mt_flags & MDBX_WRITEMAP) != 0 && !MDBX_AVOID_MSYNC); txn->tw.writemap_dirty_npages += npages; @@ -5500,7 +5501,6 @@ __hot static int __must_check_result page_dirty(MDBX_txn *txn, MDBX_page *mp, #endif /* xMDBX_DEBUG_SPILLING == 2 */ int rc; - mp->mp_txnid = txn->mt_front; if (unlikely(txn->tw.dirtyroom == 0)) { if (txn->tw.loose_count) { MDBX_page *loose = txn->tw.loose_pages; @@ -17082,7 +17082,6 @@ static pgr_t page_new(MDBX_cursor *mc, const unsigned flags) { DEBUG("db %u allocated new page %" PRIaPGNO, mc->mc_dbi, ret.page->mp_pgno); ret.page->mp_flags = (uint16_t)flags; - ret.page->mp_txnid = mc->mc_txn->mt_front; cASSERT(mc, *mc->mc_dbistate & DBI_DIRTY); cASSERT(mc, mc->mc_txn->mt_flags & MDBX_TXN_DIRTY); #if MDBX_ENABLE_PGOP_STAT @@ -17114,7 +17113,6 @@ static pgr_t page_new_large(MDBX_cursor *mc, const unsigned npages) { DEBUG("db %u allocated new large-page %" PRIaPGNO ", num %u", mc->mc_dbi, ret.page->mp_pgno, npages); ret.page->mp_flags = P_OVERFLOW; - ret.page->mp_txnid = mc->mc_txn->mt_front; cASSERT(mc, *mc->mc_dbistate & DBI_DIRTY); cASSERT(mc, mc->mc_txn->mt_flags & MDBX_TXN_DIRTY); #if MDBX_ENABLE_PGOP_STAT