Sunday, July 20, 2014

No built-in conflict detection in MySQL Multi-Master replication

Server version:         5.6.19-log MySQL Community Server (GPL)
Original Table Data:

root@server1> select * from appdb.t1;
+----+---------------------+
| id | name                |
+----+---------------------+
|  1 | N1                  |
|  2 | N2a                 |
| 11 | N1                  |
| 21 | 2014-07-20 09:51:53 |
+----+---------------------+
4 rows in set (0.08 sec)

Deletion without matching row ignored silently

root@server1> stop slave io_thread;
root@server2> stop slave io_thread;

root@server1> delete from appdb.t1 where id=1;
root@server2> delete from appdb.t1 where id=1;

root@server1> start slave io_thread;
root@server2> start slave io_thread;

Update executed without checking before image (very different from OGG, Streams, etc)

root@server1> stop slave io_thread;
root@server2> stop slave io_thread;

root@server1> update appdb.t1 set name='server1' where id=2;
root@server2> update appdb.t1 set name='server2' where id=2;

root@server1> start slave io_thread;
root@server2> start slave io_thread;

root@server1> select * from appdb.t1 where id=2;
+----+---------+
| id | name    |
+----+---------+
|  2 | server2 |
+----+---------+
1 row in set (0.00 sec)

root@server2> select * from appdb.t1 where id=2;
+----+---------+
| id | name    |
+----+---------+
|  2 | server1 |
+----+---------+

No comments:

Post a Comment