Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-31998

XA PREPARE should do binlog_prepare last

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.11.4
    • 10.11
    • XA
    • None
    • linux; generic

    Description

      in XA PREPARE execution, each storage engine involved in the XA transaction is prepared, but the order they are prepared is crucial and currently the order is wrong — currently binlog_prepare() is called before any other storage engine, but it should have been called after all other storage engines like innodb, rocksdb, etc.

      The reason is that:

      suppose there is a replication group, the master node replicates binlogs to the slave node, when the binlog of such an XA txn has been written to master node's binlog file and transmitted to slave node and before innodb has done innobase_xa_prepare(), the master node is down, then at recovery innodb will abort the XA txn, but slave node has replayed the XA txn's binlogs, causing inconsistency between the master and the slave nodes.

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              DZW David Zhao
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.