[MDEV-8458] Galera Cluster replication stream doesn't pass along MariaDB's GTID Created: 2015-07-13 Updated: 2017-12-25 Resolved: 2017-12-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera, Replication, wsrep |
| Affects Version/s: | 10.0.20-galera |
| Fix Version/s: | 10.0.34-galera |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Sachin Setiya (Inactive) |
| Resolution: | Won't Fix | Votes: | 7 |
| Labels: | galera, replication | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
If a MariaDB Galera Cluster 10.0 cluster is configured as a slave of MariaDB 10.0 using GTID, GTIDs from the master do not propagate to the WSREP replication stream. This makes it difficult to use master_use_gtid=current_pos if you ever need to switch slaves, since the non-slave nodes in the cluster won't be aware of the master's GTIDs. Let's say we have a replication topology like this:
On the master:
On galera1:
On galera2:
Now let's insert some data on the master to see how it affects gtid_current_pos:
On galera1:
On galera2 the value is now empty:
|
| Comments |
| Comment by Geoff Montee (Inactive) [ 2015-07-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Also, galera1 binlog:
galera2 binlog:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2015-07-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This might only happen if binlog_format on the MariaDB 10.0 master is set to STATEMENT. If it's set to ROW (which is required for Galera Cluster anyway), the GTIDs in the replication events seem to get passed along, and gtid_current_pos is updated. This might be working as expected. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2015-07-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This does also appear to happen in some instances when binlog_format is set to ROW. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2015-07-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It looks like the way to reproduce this with binlog_format set to ROW is by setting slave_parallel_threads on the slave. Is it required for Galera to set slave_parallel_threads to 0? e.g. on the master:
On galera1:
On galera2:
master binlog:
galera1 binlog:
galera2 binlog:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2015-07-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Same issue with: binlog_format=ROW and: binlog_format=ROW I was able to see the GTID propagate to galera2 yesterday with the second set of values, but I haven't been able to make that happen again today. There might be some other interaction going on here. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2015-07-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This problem might be unrelated to the replication thread. Leaving out the master server completely, I inserted a value directly into galera1. Galera2 assigned the transaction a different GTID. galera1:
galera2:
galera1 binlog:
galera2 binlog:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2016-05-11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Users run into this problem all the time. Should wsrep_gtid_mode ( https://mariadb.com/kb/en/mariadb/galera-cluster-system-variables/#wsrep_gtid_mode Or should this issue just be closed as Won't Fix for 10.0? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sachin Setiya (Inactive) [ 2017-12-11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi GeoffMontee! I think this can be done without wsrep_gtid_mode (some modification of 10715 patch). But there are some precaution that user should tale to avoid double apply of events on galera node | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sachin Setiya (Inactive) [ 2017-12-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
10715 patch in 10.1.31 will fix this. Wont fix for 10.0-galera. |