[MDEV-5804] If same GTID is received on multiple master connections in multi-source replication, the event is double-executed causing corruption or replication failure Created: 2014-03-07 Updated: 2014-03-17 Resolved: 2014-03-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.9 |
| Fix Version/s: | 10.0.10 |
| Type: | Bug | Priority: | Major |
| Reporter: | Kristian Nielsen | Assignee: | Kristian Nielsen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
With multi-source replication, it is possible on a slave to receive the same With correctly configured GTID, it is easy to detect that an event has already We cannot really fix this as default behaviour, as this could break upgrade of So instead of the gtid strict mode behaviour, which fails if we see D-S1-M If we receive T1=D-S1-M, and current position in D is D-S2-N with N >= M, we If M > N, then the event needs to be applied, however we need to protect A good way to implement it seems to be to have a current owner of each domain, Normally, if a slave asks to connect at GTID position D-S2-N, but the master is |
| Comments |
| Comment by Kristian Nielsen [ 2014-03-09 ] |
|
I now have a patch for this issue, which is surprisingly simple: lp:~maria-captains/maria/10.0-mdev5804 It currently only is implemented for parallel replication, @@slave_parallel_threads > 0. Other than that, it should be functional. It would be good to have some testing of it, to get some confidence that it works as expected for the rather complex setups where it is needed. |
| Comment by Kristian Nielsen [ 2014-03-09 ] |
|
To test, configure the servers with --gtid-ignore-duplicates and --slave-parallel-threads=10 (say). Then setup multi-source replication using GTID and with multiple paths between nodes. There is an example in the test case: mysql-test/suite/multi_source/gtid_ignore_duplicates.test |
| Comment by Kristian Nielsen [ 2014-03-12 ] |
|
I pushed an updated patch to the feature tree: lp:~maria-captains/maria/10.0-mdev5804 This patch should now be fairly complete. In particular, it no longer |
| Comment by Kristian Nielsen [ 2014-03-17 ] |
|
Pushed to 10.0 |