Regression in GTID consistency when parallel applying used for async replication
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC |
Fix Released
|
Undecided
|
Unassigned | ||
5.7 |
Fix Released
|
Undecided
|
Krunal Bauskar |
Bug Description
After upgrade from PXC 5.7.16 to 5.7.17, parallel async slave leads to inconsistency in GTIDs on the cluster peers. Events replicated by the async slave node get assigned the Galera's cluster UUID instead of the original async master's UUIDs. This only happens when slave_parallel_
Test case is simple - two nodes PXC cluster, where one of the nodes is slave of standalone master. Do couple of updates (to a different data set) on the PXC nodes and on the async master.
Example tests:
node1> select @@version,
*******
@@version: 5.7.16-10-57-log
@@version_comment: Percona XtraDB Cluster (GPL), Release rel10, Revision bec0879, WSREP version 27.19, wsrep_27.19
1 row in set (0.00 sec)
node1> show global variables like 'slave_par%';
+------
| Variable_name | Value |
+------
| slave_parallel_type | DATABASE |
| slave_parallel_
+------
2 rows in set (0.00 sec)
master> show master status\G
*******
File: mysql-binlog.000001
Position: 1399
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set: e893fd74-
1 row in set (0.00 sec)
node1> show global variables like 'gtid_executed'\G
*******
Variable_name: gtid_executed
Value: 5d8a1eab-
e893fd74-
1 row in set (0.00 sec)
node2> show global variables like 'gtid_executed'\G
*******
Variable_name: gtid_executed
Value: 5d8a1eab-
e893fd74-
1 row in set (0.00 sec)
node1> show status like 'wsrep_
+------
| Variable_name | Value |
+------
| wsrep_cluster_
+------
1 row in set (0.01 sec)
-- same test in 5.7.17
master> show master status\G
*******
File: mysql-binlog.000001
Position: 901
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set: e893fd74-
1 row in set (0.00 sec)
node1> select @@version,
*******
@@version: 5.7.17-11-57-log
@@version_comment: Percona XtraDB Cluster (GPL), Release rel11, Revision e2a7fdd, WSREP version 27.20, wsrep_27.20
1 row in set (0.00 sec)
node1> show global variables like 'gtid_executed'\G
*******
Variable_name: gtid_executed
Value: 5d8a1eab-
e893fd74-
1 row in set (0.00 sec)
node2> show global variables like 'gtid_executed'\G
*******
Variable_name: gtid_executed
Value: 5d8a1eab-
1 row in set (0.00 sec)
Changed in percona-xtradb-cluster: | |
status: | New → Fix Committed |
Changed in percona-xtradb-cluster: | |
status: | Fix Committed → Fix Released |
commit 13a2ed432a23ed5 1203df9d158a031 6ea0f427c6
Author: Krunal Bauskar <email address hidden>
Date: Wed May 3 11:01:21 2017 +0530
- PXC#816: Regression in GTID consistency when parallel applying used for async replication
- GTID event generated from MASTER is processed by SLAVE. workers= 0 workers > 0. workers= 0)
- SLAVE can process this event using master-thread if slave-parallel-
or assign it to slave worker is slave-parallel-
- Starting 5.7, MySQL has stopped writing this event to bin-log but PXC need
this event for proper creation of write-set so PXC has logic to cache this event.
- Hook to cache this event was wrongly placed that was triggered only if
GTID event is being processed by master-thread (that is slave-parallel-
Fix:
- Corrected hook such that the thread that is processing this event will
cache the event.