diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-02-20 15:10:03 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-02-20 21:36:36 +0200 |
commit | 947efe17ed8188ca4feef6deb0c2831a246b5c8f (patch) | |
tree | 1df8380c4c59cfb9f119f89d3022b66edb5bd610 /extra/mariabackup/wsrep.cc | |
parent | f6544353e0c84d14a333525ba26ebd30bf125615 (diff) | |
download | mariadb-git-947efe17ed8188ca4feef6deb0c2831a246b5c8f.tar.gz |
MDEV-15158 On commit, do not write to the TRX_SYS page
This is based on a prototype by
Thirunarayanan Balathandayuthapani <thiru@mariadb.com>.
Binlog and Galera write-set replication information was written into
TRX_SYS page on each commit. Instead of writing to the TRX_SYS during
normal operation, InnoDB can make use of rollback segment header pages,
which are already being written to during a commit.
The following list of fields in rollback segment header page are added:
TRX_RSEG_BINLOG_OFFSET
TRX_RSEG_BINLOG_NAME (NUL-terminated; empty name = not present)
TRX_RSEG_WSREP_XID_FORMAT (0=not present; 1=present)
TRX_RSEG_WSREP_XID_GTRID
TRX_RSEG_WSREP_XID_BQUAL
TRX_RSEG_WSREP_XID_DATA
trx_sys_t: Introduce the fields
recovered_binlog_filename, recovered_binlog_offset, recovered_wsrep_xid.
To facilitate upgrade from older mysql or mariaDB versions, we will read
the information in TRX_SYS page. It will be overridden by the
information that we find in rollback segment header pages.
Mariabackup --prepare will read the metadata from the rollback
segment header pages via trx_rseg_array_init(). It will still
not read any undo log pages or recover any transactions.
Diffstat (limited to 'extra/mariabackup/wsrep.cc')
-rw-r--r-- | extra/mariabackup/wsrep.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extra/mariabackup/wsrep.cc b/extra/mariabackup/wsrep.cc index 6e02bf5ceab..fb66611b3ee 100644 --- a/extra/mariabackup/wsrep.cc +++ b/extra/mariabackup/wsrep.cc @@ -43,7 +43,7 @@ permission notice: #include <my_global.h> #include <my_base.h> #include <handler.h> -#include <trx0sys.h> +#include <trx0rseg.h> #include "common.h" #ifdef WITH_WSREP @@ -181,7 +181,7 @@ xb_write_galera_info(bool incremental_prepare) memset(&xid, 0, sizeof(xid)); xid.formatID = -1; - if (!trx_sys_read_wsrep_checkpoint(&xid)) { + if (!trx_rseg_read_wsrep_checkpoint(xid)) { return; } |