diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-07-13 20:23:37 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-07-28 14:02:11 +0300 |
commit | 05fa4558e0e82302ece981deabce764491464eb2 (patch) | |
tree | 015565b49a28f14fb4f976515d757d09559fdd4e /storage/innobase/log | |
parent | cf3c3cce1d1078d6ac2c0d74a3cd0ff444c63db9 (diff) | |
download | mariadb-git-05fa4558e0e82302ece981deabce764491464eb2.tar.gz |
MDEV-22110 InnoDB unnecessarily writes unmodified pages
At least since commit 6a7be48b1b0b4107bf6991240ae69fcec0b7189a
InnoDB appears to be invoking buf_flush_note_modification() on pages
that were exclusively latched but not modified in a mini-transaction.
MTR_MEMO_MODIFY, mtr_t::modify(): Define not only in debug code,
but also in release code. We will set the MTR_MEMO_MODIFY flag
on the earliest mtr_t::m_memo entry that we find.
MTR_LOG_NONE: Only use this mode in cases where the previous
mode will be restored before anything is modified in the mini-transaction.
MTR_MEMO_PAGE_X_MODIFY, MTR_MEMO_PAGE_SX_MODIFY: The allowed flag
combinations that include MTR_MEMO_MODIFY.
ReleaseBlocks: Only invoke buf_flush_note_modification()
on those buffer pool blocks on which mtr_t::set_modified()
and mtr_t::modify() were invoked.
Diffstat (limited to 'storage/innobase/log')
-rw-r--r-- | storage/innobase/log/log0recv.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index 388f80cf6e2..50a225ab2cd 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -2492,7 +2492,7 @@ void recv_recover_page(fil_space_t* space, buf_page_t* bpage) { mtr_t mtr; mtr.start(); - mtr.set_log_mode(MTR_LOG_NONE); + mtr.set_log_mode(MTR_LOG_NO_REDO); ut_ad(bpage->state() == BUF_BLOCK_FILE_PAGE); buf_block_t* block = reinterpret_cast<buf_block_t*>(bpage); @@ -2576,7 +2576,7 @@ inline buf_block_t *recv_sys_t::recover_low(const page_id_t page_id, else if (fil_space_t *space= fil_space_acquire_for_io(page_id.space())) { mtr.start(); - mtr.set_log_mode(MTR_LOG_NONE); + mtr.set_log_mode(MTR_LOG_NO_REDO); block= buf_page_create(space, page_id.page_no(), space->zip_size(), &mtr); p= recv_sys.pages.find(page_id); if (p == recv_sys.pages.end()) @@ -2693,7 +2693,7 @@ void recv_sys_t::apply(bool last_batch) continue; case page_recv_t::RECV_NOT_PROCESSED: mtr.start(); - mtr.set_log_mode(MTR_LOG_NONE); + mtr.set_log_mode(MTR_LOG_NO_REDO); if (buf_block_t *block= buf_page_get_low(page_id, 0, RW_X_LATCH, nullptr, BUF_GET_IF_IN_POOL, __FILE__, __LINE__, |