Commit 361e8284 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-20813 Assertion failure in buf_flush_init_for_writing() for...

MDEV-20813 Assertion failure in buf_flush_init_for_writing() for innodb_immediate_scrub_data_uncompressed=ON

The assertion that was added in
commit c0c003be
to augment the fix of MDEV-20805 turns out to be invalid when
innodb_immediate_scrub_data_uncompressed is enabled.
In this mode, fsp_init_file_page() will be invoked on data pages
that have been freed, causing writes of almost-all-zero pages.

btr_page_free(): Adjust the comment.

buf_flush_init_for_writing(): Disable the assertion with a note
that it should be re-enabled in MDEV-15528.
parent 2227dec4
......@@ -761,9 +761,11 @@ void btr_page_free(dict_index_t* index, buf_block_t* block, mtr_t* mtr,
ut_ad(mtr_is_block_fix(mtr, block, MTR_MEMO_PAGE_X_FIX, index->table));
if (srv_immediate_scrub_data_uncompressed) {
/* In MDEV-15528 this call must be removed, and we should
zero out the page after the redo log for this mini-transaction
has been durably written. */
/* In MDEV-15528 this code must be removed and the
check in buf_flush_init_for_writing() re-enabled. We
should zero out the page after the redo log for this
mini-transaction has been durably written. The log
would include the 10.4 MLOG_INIT_FREE_PAGE record. */
fsp_init_file_page(fil_space_get(index->space), block, mtr);
}
}
......
......@@ -856,7 +856,14 @@ buf_flush_init_for_writing(
|| &block->page.zip == page_zip_);
ut_ad(!srv_safe_truncate || !block || newest_lsn);
ut_ad(page);
#if 0 /* MDEV-15528 TODO: reinstate this check */
/* innodb_immediate_scrub_data_uncompressed=ON would cause
fsp_init_file_page() to be called on freed pages, and thus
cause them to be written as almost-all-zeroed.
In MDEV-15528 we should change that implement an option to
make freed pages appear all-zero, bypassing this code. */
ut_ad(!srv_safe_truncate || !newest_lsn || fil_page_get_type(page));
#endif
if (page_zip_) {
page_zip_des_t* page_zip;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment