[MDEV-25653] Replication between two cluster fails on ADD PARTITION Created: 2021-05-11 Updated: 2021-06-11 Resolved: 2021-05-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera, Partitioning, Replication |
| Affects Version/s: | 10.5.9 |
| Fix Version/s: | 10.4.19, 10.5.10 |
| Type: | Bug | Priority: | Major |
| Reporter: | Hartmut Holzgraefe | Assignee: | Hartmut Holzgraefe |
| Resolution: | Duplicate | Votes: | 2 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Having two Galera clusters, with async replication between them, an ALTER TABLE ... ADD PARTITION gets only applied on the actual replication slave node in the slave cluster, but not the other cluster node(s) in the slave cluster. How to reproduce;
Configuration:
server_id, wsrep_node_address and wsrep_node_name differ by by node, and wsrep_cluster_name, wsrep_cluster_address differ between the two clusters. The SQL statements I use for testing are:
The secondary node on the replicating cluster fails with the following messages on the last INSERT:
There are no log messages before that, so the ADD PARTITION got ignored silently. When doing SHOW CREATE TABLE on the actual slave in the 2nd cluster I see:
as expected, but on the other node I do not see the p4 partition:
There was no log output of any kind at the point of time when the ADD PARTITION was executed, only when trying to actually insert data into the new partition the secondary node failed. |
| Comments |
| Comment by Hartmut Holzgraefe [ 2021-05-11 ] |
|
I attached my Vagrant test setup, consisting of a Vagrantfile setting up all nodes and the replication between them, and a galera.cnf tempate file. For testing you'd need vagrant, virtualbox, and both the files in the same directory. You can then start up everything with "vagrant up", and log into individual nodes with "vagrant ssh node-name". node-name are:
After "vagrant up" has completed both clusters and replication between them is set up, but the test table is not created yet. You can then log into the master with "vagrant ssh master-1" and execute the how-to-reproduce SQL from above, then log into slave-1 and slave-2 to see that the first replicated everything, but that the 2nd does not have the added partition, and fails upon the last INSERT statement |
| Comment by Mario Karuza (Inactive) [ 2021-05-13 ] |
|
This was fixed with |
| Comment by Hartmut Holzgraefe [ 2021-05-14 ] |
|
Duplicate of |