tag:blogger.com,1999:blog-16959946.post7808725388088386238..comments2023-12-09T16:44:47.897+01:00Comments on The Data Charmer: Multi-master data conflicts - Part 2: dealing with conflictsGiuseppe Maxiahttp://www.blogger.com/profile/15801583338057324813noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-16959946.post-46775968345830111982013-03-28T14:06:46.207+01:002013-03-28T14:06:46.207+01:00Hi Giuseppe,
Nice writeup on the topic, have a f...Hi Giuseppe,<br /> Nice writeup on the topic, have a few comments :<br /><br /> - MySQL Cluster using 2PC - note that internally MySQL Cluster horizontally divides tables into fragments, and replicates these fragments. For each set of fragment replicas, one and only one is considered 'Primary' at any time. Writes are internally routed to the primary replica first, so it's really more like your 'Enforced Discipline' category. The 2PC ensures that locks are held until the data is committed on all fragment replicas, and that transactions are atomic etc, but it doesn't really prevent conflicts - that is done by locking on the primary fragment replicas. Of course MySQL Cluster also has lots of internal infrastructure to detect failures, failover, failback etc..<br /><br /> - Conflict Resolution After-the-fact<br /> MySQL Cluster has supported this for a number of years. http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-replication-conflict-resolution.html. Recently we added more variants, including an interesting 'transactional conflict resolution' mechanism using Node Priority. I wrote extensively about this on my blog : http://messagepassing.blogspot.co.uk/2011/10/eventual-consistency-with-mysql.html<br /><br /> - Fan-in topology<br /> MySQL Cluster can do this too, as it can have multiple slaves connected to the same cluster, replicating from different masters.<br /> This allows all sorts of topologies, stars etc. <br /><br /> In general I agree that an enforced disciplined approach is probably a great trade-off, with more exotic approaches useful for occasional well understood use cases.<br /><br />Frazer<br /><br />Frazer Clementhttps://www.blogger.com/profile/05435364450772586515noreply@blogger.com