Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-4266

support xa interleaving on slave thread

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.6.39-83.1, 5.7.21-20
    • Component/s: TokuDB
    • Labels:
      None
    • Environment:

      PS-5.7.20-18

      Description

      XA log entries can be interleaved in the binlog since XA prepare on the master flushes to the binlog.

      There can be log entries from different clients pushed into the binlog before XA commit is executed on the master.
      Therefore, the slave thread must be able to juggle multiple XA transactions.
      Tokudb does this by zapping the client transaction context on the slave when executing the XA prepare and expecting to process XA commit with commit_by_xid (which supplies the XID so that the transaction can be looked up and committed).

      To reproduce this bug using:
      https://github.com/XeLabs/tokudb/blob/1033c6ae36db712713aa7b8f4256267dba1446ed/mysql-test/suite/tokudb.rpl/t/rpl_xa_interleave.test

      Patch:
      https://github.com/XeLabs/tokudb/commit/1033c6ae36db712713aa7b8f4256267dba1446ed

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              vladislav.lesin Vladislav Lesin (Inactive)
              Reporter:
              BohuTANG BohuTANG
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: