Uploaded image for project: 'Percona XtraDB Cluster'
  1. Percona XtraDB Cluster
  2. PXC-1980

LP #1692023: Statements executed in RSU mode produce GTID entries with local UUID


    • Bug
    • Status: Done
    • Low
    • Resolution: Invalid
    • None
    • None
    • None


      **Reported in Launchpad by Przemek last update 20-06-2017 04:12:12

      DDL or other statements executed in wsrep_OSU_method = RSU, break cluster's consistency in terms of MySQL's GTID notation as they are add GTID entries with node's own UUID.
      In fact, I don't think statements executed in RSU method should create any GTID event at all, as they do not increase the Galera's global transaction counter as well. Also it doesn't make sense to make those statements getting logged in the node's binary log, as it makes it inconsistent with the rest of the cluster (there is never a guarantee an RSU statement will be executed on all nodes, and when).

      Here is example binary log from a session where I executed flush hosts first in TOI, and then in RSU method:
      mysql> show binlog events in 'mysql1-binlog.000004';

      Log_name Pos Event_type Server_id End_log_pos Info


      mysql1-binlog.000004 4 Format_desc 100 123 Server ver: 5.7.17-13-29.20-log, Binlog ver: 4
      mysql1-binlog.000004 123 Previous_gtids 100 194 c101abff-5592-ee19-488d-9da065411b45:10-14
      mysql1-binlog.000004 194 Gtid 100 259 SET @@SESSION.GTID_NEXT= 'c101abff-5592-ee19-488d-9da065411b45:15'
      mysql1-binlog.000004 259 Query 100 337 use `test`; flush hosts
      mysql1-binlog.000004 337 Gtid 100 402 SET @@SESSION.GTID_NEXT= 'c101abff-5592-ee19-488d-9da065411b45:16'
      mysql1-binlog.000004 402 Query 100 480 use `test`; flush hosts
      mysql1-binlog.000004 480 Gtid 100 545 SET @@SESSION.GTID_NEXT= 'daf220b6-2c1c-11e7-b427-0242ac110001:1'
      mysql1-binlog.000004 545 Query 100 623 use `test`; flush hosts
      mysql1-binlog.000004 623 Gtid 100 688 SET @@SESSION.GTID_NEXT= 'daf220b6-2c1c-11e7-b427-0242ac110001:2'
      mysql1-binlog.000004 688 Query 100 766 use `test`; flush hosts
      mysql1-binlog.000004 766 Rotate 100 817 mysql1-binlog.000005;pos=4

      11 rows in set (0.00 sec)




            krunal.bauskar Krunal Bauskar (Inactive)
            lpjirasync lpjirasync (Inactive)
            0 Vote for this issue
            2 Start watching this issue



              Smart Checklist