MySQL GTID metadata not synced upon full SST
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
| 5.6 |
Fix Committed
|
Undecided
|
Unassigned | ||
| 5.7 |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
Tested with Server version: 5.6.35-81.0-56-log Percona XtraDB Cluster (GPL), Release rel81.0, Revision 7f9b6ae, WSREP version 26.20, wsrep_26.20
When new node is added to a cluster, where all nodes are GTID enabled, after successful full SST, the joiner has unset initial GTID position.
Test case:
* bootstrap first node with settings:
server-id=1
enforce_
gtid_mode=on
log_slave_updates
log-bin=
* execute some writes
* start second node with same settings
* example result:
percona1 mysql> show global variables like 'gtid%';
+------
| Variable_name | Value |
+------
| gtid_deployment
| gtid_executed | 102cd5f1-
| gtid_mode | ON |
| gtid_owned | |
| gtid_purged | |
+------
5 rows in set (0.00 sec)
percona2 mysql> show global variables like 'gtid%';
+------
| Variable_name | Value |
+------
| gtid_deployment
| gtid_executed | |
| gtid_mode | ON |
| gtid_owned | |
| gtid_purged | |
+------
5 rows in set (0.03 sec)
* execute more writes, and see out of sync positions:
percona1 mysql> show global variables like 'gtid_e%';
+------
| Variable_name | Value |
+------
| gtid_executed | 102cd5f1-
+------
1 row in set (0.00 sec)
percona2 mysql> show global variables like 'gtid_e%';
+------
| Variable_name | Value |
+------
| gtid_executed | 102cd5f1-
+------
1 row in set (0.00 sec)
Quick test on PXC 5.7.16 worked well though, GTID was synced properly.
Kenn Takara (kenn-takara) wrote : | #1 |
Przemek (pmalkowski) wrote : | #2 |
percona2 mysql> select @@version,
*******
@@version: 5.6.35-81.0-56-log
@@version_comment: Percona XtraDB Cluster (GPL), Release rel81.0, Revision 7f9b6ae, WSREP version 26.20, wsrep_26.20
1 row in set (0.00 sec)
I commented out all sst related options (earlier had compression enabled), and I can still reproduce at will. Here is my full config, almost same on donor and joiner:
[mysqld]
datadir=
skip_name_resolve
user=mysql
log_error=
binlog_format=ROW
wsrep_provider=
wsrep_cluster_
wsrep_node_
wsrep_slave_
wsrep_cluster_
wsrep_sst_
wsrep_sst_
wsrep_node_
innodb_
innodb_
innodb_
bind-address=
log_slave_updates
server-id=22
#support GTID
enforce_
gtid_mode=on
log-bin=
max_allowed_packet = 64M
Even though GTID info is stored from the SST here:
[root@percona2 ~]# cat /var/lib/
uuid = 1ac205e3-
name =
tool_name = innobackupex
tool_command = --defaults-
tool_version = 2.3.8
ibbackup_version = 2.3.8
server_version = 5.6.35-81.0-56-log
start_time = 2017-05-18 18:28:15
end_time = 2017-05-18 18:29:03
lock_time = 0
binlog_pos = filename 'percona1-
innodb_from_lsn = 0
innodb_to_lsn = 649078051
partial = N
incremental = N
format = xbstream
compact = N
compressed = N
encrypted = N
The GTID global variable is *empty* on the joiner.
Joiner and donor logs in attachment.
Przemek (pmalkowski) wrote : | #3 |
btw, on both:
# xtrabackup --version
xtrabackup version 2.3.8 based on MySQL server 5.6.24 Linux (x86_64) (revision id: 9328211)
Kenn Takara (kenn-takara) wrote : | #4 |
Ok, I see, the problem is that the names for the binlog are different. The SST script expects the name to be the same.
log-bin=percona
(for both donor and joiner).
Kenn Takara (kenn-takara) wrote : | #5 |
Possible workaround: ensure that the log-bin is the same for the donor/joiner (or ensure that the actual binlog files have the same name on the donor/joiner).
Note that the default is to use <hostname>-bin, however it might be better to be explicit 'log-bin=
Sveta Smirnova (svetasmirnova) wrote : | #6 |
Progress logged in Jira bug: https:/
Shahriyar Rzayev (rzayev-sehriyar) wrote : | #7 |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/
Hmmm.. everything works ok for me with 5.6.35-26.20 and 5.6.35-26.20.v3 (this is the one that is being used above).
Do you have the logs for the second node?