Multi-Master Conflicts - How to Handle Them
Source: https://arpitbhayani.me/blogs/conflict-resolution Date: 2022-01-03
Explore conflict resolution strategies in multi-master databases. Learn to handle conflicts with unique IDs, database precedence, & custom logic.
Every multi-master replication setup comes with a side-effect - Conflicts. Conflict happens when two or more database accepts conflicting updates on the same record. We say that the updates are conflicting when we cannot resolve them to one value deterministically. In the previous essay, we took a detailed look into Conflict Detection, and in this one, we go in-depth to understand ways to handle conflicts (resolve and avoid).
Conflict Resolution
In the case of a single-master setup, conflicts are avoided by funneling all the writes sequentially. When there are multiple updates on the same field, the last write operation on the record will determine the final value. We can leverage this insight into devising solutions that apply to multi-master setup.

