diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-01-11 17:50:52 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-01-11 17:50:52 +0200 |
commit | c1884122d70683c01003362a0660940515407beb (patch) | |
tree | d51a6aad403bc88f89e9c23633c22a306d071deb | |
parent | 3135e5e14e12fbb22097886033ba2a830e2bb3e3 (diff) | |
download | mariadb-git-c1884122d70683c01003362a0660940515407beb.tar.gz |
Correct Innodb_log_write_requests
log_close(): Update log_sys.write_to_buf.
mtr_t::commit(): Remove the conditional update of log_sys.write_to_buf.
We do write to the log even if we are not marking pages modified for
the first time.
mtr_t::commit_shrink(): Let log_close() in mtr_t::finish_write() update
log_sys.write_to_buf.
-rw-r--r-- | storage/innobase/mtr/mtr0mtr.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc index ff16b32634f..9dbe6704259 100644 --- a/storage/innobase/mtr/mtr0mtr.cc +++ b/storage/innobase/mtr/mtr0mtr.cc @@ -407,10 +407,7 @@ void mtr_t::commit() lsns= { m_commit_lsn, PAGE_FLUSH_NO }; if (m_made_dirty) - { - ++log_sys.write_to_buf; mysql_mutex_lock(&log_sys.flush_order_mutex); - } /* It is now safe to release log_sys.mutex because the buf_pool.flush_order_mutex will ensure that we are the first one @@ -520,7 +517,6 @@ void mtr_t::commit_shrink(fil_space_t &space) const lsn_t start_lsn= finish_write(prepare_write()).first; - log_sys.write_to_buf++; mysql_mutex_lock(&log_sys.flush_order_mutex); /* Durably write the reduced FSP_SIZE before truncating the data file. */ log_write_and_flush(); @@ -836,6 +832,7 @@ inline lsn_t log_t::append_prepare(size_t size) noexcept static mtr_t::page_flush_ahead log_close(lsn_t lsn) noexcept { mysql_mutex_assert_owner(&log_sys.mutex); + log_sys.write_to_buf++; log_sys.set_lsn(lsn); const lsn_t checkpoint_age= lsn - log_sys.last_checkpoint_lsn; |