summaryrefslogtreecommitdiff
path: root/storage/innobase/include/trx0rec.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-04-25 13:05:40 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-04-26 22:53:33 +0300
commit76c62bc69c6f048111775877beb2072679b34ffb (patch)
tree330a307d20c27caf63554f920647896799c96673 /storage/innobase/include/trx0rec.h
parent83bd4dd1ee9e7abe2ee33860b15edf7ec72c6b14 (diff)
downloadmariadb-git-76c62bc69c6f048111775877beb2072679b34ffb.tar.gz
MDEV-15914: Restore MLOG_UNDO_INSERT
trx_undof_page_add_undo_rec_log(): Write the MLOG_UNDO_INSERT record instead of the equivalent MLOG_2BYTES and MLOG_WRITE_STRING. This essentially reverts commit 9ee8917dfd4b6c9d342cbc030ca71bad637fa24a. In MariaDB 10.3, I attempted to simplify the crash recovery code by making use of lower-level redo log records. It turns out that we must keep the redo log parsing code in order to allow crash-upgrade from older MariaDB versions (MDEV-14848). Now, it further turns out that the InnoDB redo log record format is suboptimal for logging multiple changes to a single page. This simple change to the redo logging of undo log significantly affects the INSERT and UPDATE performance. Essentially, we wrote (space_id,page_number,MLOG_2BYTES,2 bytes) (space_id,page_number,MLOG_WRITE_STRING,N+4 bytes) instead of the previously written (space_id,page_number,MLOG_UNDO_INSERT,N+2 bytes) The added redo log volume caused a single-threaded INSERT (without innodb_adaptive_hash_index) of 1,000,000 rows to consume 11 seconds instead of 9 seconds, and a subsequent UPDATE of 30,000,000 rows to consume 64 seconds instead of 58 seconds. If we omitted all redo logging for the undo log, the INSERT would consume only 4 seconds.
Diffstat (limited to 'storage/innobase/include/trx0rec.h')
-rw-r--r--storage/innobase/include/trx0rec.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/innobase/include/trx0rec.h b/storage/innobase/include/trx0rec.h
index 955a726eb50..88c98625462 100644
--- a/storage/innobase/include/trx0rec.h
+++ b/storage/innobase/include/trx0rec.h
@@ -244,7 +244,7 @@ trx_undo_prev_version_build(
into this function by purge thread or not.
And if we read "after image" of undo log */
-/** Parse MLOG_UNDO_INSERT for crash-upgrade from MariaDB 10.2.
+/** Parse MLOG_UNDO_INSERT.
@param[in] ptr log record
@param[in] end_ptr end of log record buffer
@param[in,out] page page or NULL