Skip to content

Commit

Permalink
MDEV-33137: Assertion end_lsn == page_lsn failed in recv_recover_page
Browse files Browse the repository at this point in the history
trx_purge_free_segment(), trx_purge_truncate_rseg_history():
Do not claim that the blocks will be modified in the mini-transaction,
because that will not always be the case. Whenever there is a
modification, mtr_t::set_modified() will flag it.

The debug assertion that failed in recovery is checking that all
changes to data pages are covered by log records. Due to these
incorrect calls, we would unnecessarily write unmodified data pages,
which is something that commit 05fa455
aims to avoid.

The incorrect calls had originally been added in
commit de31ca6 (MDEV-32820) and
commit 86767bc (MDEV-29593).

Reviewed by: Vladislav Lesin
Tested by: Elena Stepanova
  • Loading branch information
dr-m committed Jan 10, 2024
1 parent c6c2a2b commit 4cbf75d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions storage/innobase/trx/trx0purge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,8 @@ static void trx_purge_free_segment(buf_block_t *rseg_hdr, buf_block_t *block,
ut_ad(rseg_hdr->page.id() == rseg_hdr_id);
block->page.lock.x_lock();
ut_ad(block->page.id() == id);
mtr.memo_push(rseg_hdr, MTR_MEMO_PAGE_X_MODIFY);
mtr.memo_push(block, MTR_MEMO_PAGE_X_MODIFY);
mtr.memo_push(rseg_hdr, MTR_MEMO_PAGE_X_FIX);
mtr.memo_push(block, MTR_MEMO_PAGE_X_FIX);
}

while (!fseg_free_step(TRX_UNDO_SEG_HDR + TRX_UNDO_FSEG_HEADER +
Expand Down Expand Up @@ -502,7 +502,7 @@ trx_purge_truncate_rseg_history(trx_rseg_t &rseg,
mtr.start();
rseg_hdr->page.lock.x_lock();
ut_ad(rseg_hdr->page.id() == rseg.page_id());
mtr.memo_push(rseg_hdr, MTR_MEMO_PAGE_X_MODIFY);
mtr.memo_push(rseg_hdr, MTR_MEMO_PAGE_X_FIX);

goto loop;
}
Expand Down

0 comments on commit 4cbf75d

Please sign in to comment.