Conflict is when the Master database are not in sync.
MySQL Master Master have a cool conflict. When the latency between two server is high you could get a case where two database
could be modifying the same row and instead of clobbering each other. The data from the database swaped instead.
could be modifying the same row and instead of clobbering each other. The data from the database swaped instead.
Server A Server B
row 1: c row 1: c
change row 1 = a change row 1 = b
High Latency
get change from b get change from a
set row 1 = b set row 1 = a
row 1: b row 1: a
Trying it your Self
Now both database will have one animal in the animals table.
id:1, name:chicken
Now the bug kick in and we get a dog in sql2 and a cat in sql1
No comments:
Post a Comment