liveBook · Manning

Conflict resolution

As explained in ScyllaDB in Action

Conflict resolution is the process of selecting a resulting value when concurrent writes assign different values to the same data.

Conflict resolution selects the value that remains when concurrent writes assign different values to the same data. ScyllaDB resolves these conflicts with last write wins: each update receives a microsecond-precision timestamp, and replicas eventually converge on the value with the latest timestamp. section 6.1.2

Edith and Emily edit an author bio

Edith updates a bio with QUORUM consistency. Emily writes milliseconds later with ONE consistency, so only one node initially acknowledges her update. Emily still wins because her write has the later timestamp, which eventually replicates to all replicas. This can lose Edith’s update because timestamps cannot represent additional editing context. section 6.1.2

Figure 6.1 In Scylla, the write timestamp of a query takes precedence over the number of replicas a node is stored on.
figure

Compare replica count with write timestamps: the newer timestamp takes precedence, even when the older value exists on more replicas. section 6.1.2

Prevent lost updates with conditional updates or client-side coordination such as distributed locking. Query timestamps can also be overridden explicitly, so stale timestamps do not replace newer cell values. section 6.1.2

How ScyllaDB in Action covers it

How deep it goes
Explains timestamp-based convergence, replica behavior, lost writes, and prevention options without detailing their implementation.
Examples
Uses simultaneous author-bio edits, QUORUM and ONE writes, and CQL timestamp inspection and overrides.
What it assumes
Assumes basic distributed-database writes while introducing eventual consistency and consistency levels through an application example.
What you can do after
Diagnose which concurrent value wins and choose conditional updates or coordination to reduce lost writes.
How it connects
Connects eventual consistency, consistency levels, replicas, conditional updates, and distributed locking.

Also explained in

Compare how 4 books explain conflict resolution →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ScyllaDB in Action. The section links point to the parts of the book it draws on.