Skip to content

Commit

Permalink
MDEV-22710 Assertion ...status != buf_page_t::FREED in ibuf_remove_fr…
Browse files Browse the repository at this point in the history
…ee_page()

The buf_page_free() call that was introduced in MDEV-15528 was
performed too early in fseg_free_page(), tripping a debug check
in ibuf_remove_free_page(). In all other callers, we can (and will)
invoke buf_page_free() right after fseg_free_page(), but in
ibuf_remove_free_page() we will defer that call to the end of the
mini-transaction. (That call was already present.)
  • Loading branch information
dr-m committed Jun 3, 2020
1 parent 463a8fc commit 58d2d82
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions storage/innobase/btr/btr0btr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@ void btr_page_free(dict_index_t* index, buf_block_t* block, mtr_t* mtr,
: PAGE_HEADER + PAGE_BTR_SEG_TOP];
fseg_free_page(seg_header,
index->table->space, block->page.id.page_no(), mtr);
buf_page_free(block->page.id, mtr, __FILE__, __LINE__);

/* The page was marked free in the allocation bitmap, but it
should remain exclusively latched until mtr_t::commit() or until it
Expand Down
2 changes: 0 additions & 2 deletions storage/innobase/fsp/fsp0fsp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2622,8 +2622,6 @@ fseg_free_page(

fseg_free_page_low(seg_inode, iblock, space, offset, mtr);

buf_page_free(page_id_t(space->id, offset), mtr, __FILE__, __LINE__);

DBUG_VOID_RETURN;
}

Expand Down
1 change: 1 addition & 0 deletions storage/innobase/trx/trx0undo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,7 @@ trx_undo_free_page(
fseg_free_page(TRX_UNDO_SEG_HDR + TRX_UNDO_FSEG_HEADER
+ header_block->frame,
rseg->space, page_no, mtr);
buf_page_free(page_id_t(space, page_no), mtr, __FILE__, __LINE__);

const fil_addr_t last_addr = flst_get_last(
TRX_UNDO_SEG_HDR + TRX_UNDO_PAGE_LIST + header_block->frame);
Expand Down

0 comments on commit 58d2d82

Please sign in to comment.