MySQL asynchronous multi master replication conflict resolution

Posted on

Question :

I have setup Multi Master replication, following this blog thread:

http://0wned.it/geek-bits/guides/mysql-multi-master-replication/

And now it synchronizes perfectly, up until the moment the connection between the servers is lost. When I have no connection both servers still update fields. This results in the following problem:

  • connection is lost.
  • server1 updates a field to the value “bike”.
  • server2 updates the same field a few seconds later to the value “car”
  • connection restored
  • server1 gets the value “car” from server2 and updates the field
  • server2 gets the value “bike” from server 1 and updates the field.

Is there a way to check if the value has already has been changed and neglect the update based on time of update? In the field on both servers the value “car” should be the current value.

Answer :

Conflict-free replication isn’t supported in multi-source replication…

You should look at cluster multi-master setup, but, I don’t know a multi-master cluster with lazy updates (async-replication).

Leave a Reply

Your email address will not be published.