1

I have set up normal (non-clustered, ndb) two server Mysql Master-Master replication for high availability. Each server has an application that can update the local database, the changes propagate to the other database via replication.

It is possible that both applications can do an update on the same data item, with the newer one overwriting the older during the replication process. Mysql Cluster solves this problem with a "same value wins" conflict resololution set-up.

Is it possible to setup similar or same conflict resolution rules for non-cluster (ndb) replication?

  • the behavior you mentioned about MySQL cluster should be "greatest timestamp wins". "same value wins" ensure that the update is applied only if the updated value is the same on both the master and the slave; otherwise, the update is not applied on the slave and an exception is written to the log. Referemce: http://dev.mysql.com/doc/refman/5.6/en/mysql-cluster-replication-conflict-resolution.html#mysql-cluster-replication-ndb-old – Chris Lam Jul 22 '14 at 15:01

1 Answers1

2

So, after days of investigation it looks like the answer is 'No' - Mysql replication does not support update conflict resolution options like they are available with Mysql cluster. I just wasn't able to find a single setting or option that would point in the right direction.

Unfortunately Mysql Cluster wasn't an option for me because it requires 3 servers (2 workers, one admin) as a minimum and I am running a 2 server system.

I did investigate semi-synchronous replication (MySQL 5.5) but this didn't have any better conflict resolution either.

In the end I had to go back and re-conceive the application to minimise/avoid the risk of conflict.