Learning path

Full curriculum

Full curriculum

Arrows go from each prerequisite to the units that depend on it. Hover or focus a unit to highlight its path.

Unit content

Conflict detection and resolution in replicated data

When replicas accept updates independently, two writes can be concurrent: neither was produced with knowledge of the other.

A system must then decide whether the values can be merged, whether one should win, or whether the conflict must be exposed for application-level resolution.

Simple policies such as last-write-wins choose one value using an ordering rule, but they can discard meaningful updates and depend on the quality of that ordering.

Other data types admit semantic merges. A grow-only set, for example, can combine independently added elements by taking their union.

Causal metadata such as vector clocks can distinguish an update that supersedes an older value from genuinely concurrent updates.

Conflict resolution is therefore part of the data model: the infrastructure cannot infer the intended meaning of incompatible business operations from timestamps alone.