Two hierarchies that must not be merged
Why are isolation levels and distributed consistency models two separate axes?
The single most valuable move here is to refuse to merge two families of models into one scale.
- Isolation levels are about many objects, one logical copy. They say which interleavings of multi-object transactions are allowed. Examples: Read Committed, Snapshot Isolation, Serializable.
- Distributed consistency models are about one object, many physical copies. They say what recency and what ordering a single operation gets. Examples: linearizable, causal, eventual.
They are two different axes, not one ladder. Two sentences show why:
- Serializability says nothing about real time. A serializable read-only transaction may legally be placed in the serial order arbitrarily far in the past. A system that always returns the initial (empty) state to readers is serializable! It just orders every reader before every writer.
- Linearizability says nothing about grouping. It gives a perfect timeline for each single object, and no atomicity across two objects. A reader can see object x updated and object y not yet updated.
That explains Anika's colleague. "Serializable" is a promise about grouping. Sam's and Anika's complaints are about recency of a single balance on a copy. Serializable gives no promise there.
The product of the two axes is the real space of possibilities:
| Single-object recency: none | Causal | Linearizable | |
|---|---|---|---|
| Multi-object: none | Eventual consistency | Causal consistency | Linearizability |
| Read Committed–like | Read Committed on a replica set | Transactional causal consistency (the "HAT ceiling", The unification and its price) | Read Committed on a single leader |
| Snapshot / Repeatable Read | Snapshot isolation on asynchronous replicas | Causally consistent snapshot isolation | Snapshot isolation on a leader |
| Serializable | Serializable, but stale | — (no standard name) | Strict serializability = "external consistency" |
The top-right corner of the full lattice, strict serializability, has a name (also external consistency; The unification and its price). It is serializability plus real time. It is the only cell with no anomalies left.
Read the anomalies in the next article as a derivation from this table, not as a list to memorize. The famous names (dirty read, non-repeatable read, read skew, phantom, lost update, write skew) are names for the cells you are standing in.
The standard level names do not fit this table cleanly: snapshot isolation cannot even be placed on the ANSI scale. Why the taxonomy is broken, precisely explains why.