Technical ·
How Database and Network Words Came to Mean Several Things
The history behind repeatable read, consistency, gateways and exactly-once execution: how systems vocabulary changes, crosses fields and loses its assumptions.
I keep rereading the same chapters. One well-regarded book tells me three-phase commit is nonblocking. Another tells me it does not work on real networks. One says repeatable read prevents phantoms, the next says it allows them, and a database manual says it means snapshot isolation.
For a while I assumed I was reading carelessly. Then I went back to the papers the books cite. Some disagreements came from a standard changing a name’s meaning. Others came from different communities using the same word. Still others came from a careful claim losing its qualifications on the way into a textbook.
The history reaches beyond databases. A network can deliver bytes reliably without telling a client whether its request succeeded. A memory system can be consistent in a sense that says nothing about whether a bank balance is legal. Even a word as ordinary as “gateway” carries an older networking vocabulary inside it.
These are different kinds of confusion, and treating all of them as sloppy terminology misses something useful. A name can change while the implementation stays the same. An implementation can change while the name stays the same. A guarantee can remain perfectly precise in its original paper and become misleading when carried across a system boundary.
This is a history of those crossings, for people who have read one good book on systems and were confused by the second.
Before the words crossed
In 1970, E. F. Codd opened A Relational Model of Data for Large Shared Data Banks with a problem of independence: users and programs should not have to know how data is arranged in storage. His relations were mathematical sets of tuples. The model gave database users a way to describe data without prescribing the paths a program must follow to reach it.
The distinction still matters when reading SQL. A relation cannot contain duplicate tuples, but an ordinary SQL query can return duplicate rows. PostgreSQL’s SELECT documentation makes the choice explicit: ALL is the default; DISTINCT removes duplicates. The practical language and the mathematical model are closely related, but reasoning about one does not automatically establish the behaviour of the other.
Meanwhile, shared-memory computing had its own problem: how should several processors observe reads and writes? In 1979, Leslie Lamport defined sequential consistency. An execution must have the same result as some sequential ordering of the operations, preserving each processor’s program order. The question was which observations an execution permits.
These communities were choosing vocabulary around different objects: relations, transactions, memory operations. Once those objects appeared together in distributed databases, their words appeared together too. “Consistent” did not arrive with a single inherited meaning.
Repeatable read: a name that outlived its meaning
In 1976, Jim Gray and three colleagues at IBM described four “degrees of consistency”. Degree 3, the strongest, “isolates the transaction from dirty relationships among values. Reads are repeatable.” IBM’s products and Chris Date’s textbook then used “repeatable read” as the name for that strongest level: what we would now call serializable.
The first SQL standard, in 1986, had no levels at all. It required only that concurrent transactions be serializable. SQL-92 introduced four levels and defined them by three things that must not happen: a dirty read, a non-repeatable read and a phantom. It gave the name REPEATABLE READ to the second-strongest level, which allows phantoms. The old name now pointed at something weaker.
In 1995, six authors including Gray himself published A Critique of ANSI SQL Isolation Levels. They found that the three phenomena admitted different readings and did not adequately characterize the isolation levels used in practice. A description could refer to a completed anomaly or to a pattern of operations that could produce one. Their objection to the renamed level was particularly direct: under it, “reads are NOT repeatable!”
The same paper added the anomalies the standard had missed, including lost update and write skew, and gave a name to something products were already doing: snapshot isolation, where each transaction reads from a snapshot taken when it started. Snapshot isolation fits nowhere in the standard’s ladder. It has no phantoms in the standard’s strict sense, yet it is not serializable, and it is incomparable with the lock-based repeatable read described in the critique: each forbids executions the other permits.
The standard names therefore did not provide a sufficient map of implementation behaviour. Product documentation and testing show how far apart the names can be:
| Product | What its “repeatable read” does |
|---|---|
| Db2 | The 1970s meaning. Phantom reads “are not possible”; a separate level, read stability, allows them. |
| SQL Server | The SQL-92 meaning. Lock-based, and other transactions can insert phantom rows. Snapshot is a separate level. |
| PostgreSQL | Snapshot isolation, in its own documentation’s words. |
| MySQL (InnoDB) | A 2023 Jepsen analysis of version 8.0.34 found anomalies, including lost updates, that snapshot isolation forbids. |
| Oracle | No level by that name. Its “serializable” is snapshot-based, which is why Martin Kleppmann wrote that it “is actually not serializable at all”. |
Even one product’s history has the split. Until 2011, PostgreSQL’s SERIALIZABLE was snapshot isolation. Version 9.1 added a true serializable level, and the release notes say where the old behaviour went: “The old snapshot isolation behavior is still available by requesting the REPEATABLE READ isolation level.”
A book that says repeatable read prevents phantoms and a book that says it does not can both be quoting a primary source accurately.
ACID: three properties, then a pun
Gray’s 1981 paper The Transaction Concept lists three properties of a transaction: consistency, atomicity and durability, in that order. Isolation is not among them.
The acronym came two years later, from Theo Härder and Andreas Reuter, who added isolation and introduced the four letters as a pun: whether a system supports the transaction is “the ACID test of the system’s quality”.
Their C needs a different kind of explanation. Consistency means that a successful transaction “commits only legal results”. The application determines what counts as legal, and the database can enforce some of those rules through constraints. A unique constraint can prevent duplicate account identifiers; it cannot decide which transfers the business ought to authorize. ACID consistency is about preserving the required invariants, not a promise that the engine understands every rule of the application.
Atomic and consistent: two fields, one vocabulary
The memory-system meaning of consistency helps explain a second collision: “atomic”.
In databases, atomic means all-or-nothing: a failed transaction leaves no partial result. In concurrent computing, Leslie Lamport’s atomic register is one in which “reads and writes behave as if they occur in some definite order”. This is an ordering property of reads and writes; it is not, by itself, a definition of transaction rollback. Lamport saw the collision as he made it, and added a footnote: “In the context of databases, atomicity often denotes the additional property that a failure cannot leave the database in a state reflecting a partially completed transaction.”
Consistency went the same way, with more at stake. Eric Brewer’s 2000 keynote stated that a shared-data system can have at most two of consistency, availability and tolerance to network partitions. The slides define none of the three. His own conclusions list “poor definitions of consistency/availability goals” as a problem.
The definitions arrived two years later, when Seth Gilbert and Nancy Lynch proved a version of the claim. To prove it they had to choose, and they chose the concurrent-computing meaning: every operation “looks as if it were completed at a single instant”. Their footnote warns that this is not the database meaning, and that it also differs from the atomic in ACID.
In that formalization, CAP consistency is an atomic, or linearizable, view of the data. ACID atomicity concerns partial transaction effects; ACID consistency concerns invariants. Substituting one meaning for another changes the question being answered.
By 2016, a survey of consistency in storage systems catalogued “more than 50 different consistency notions”.
The vocabulary expanded again as replicated Internet services became widely discussed. In his 2008 explanation of eventual consistency, Werner Vogels separated the propagation of updates from guarantees visible to an individual client. If updates stop, eventual consistency promises that reads will eventually reflect the final update. That alone supplies no fixed deadline and does not promise that a client immediately sees its own write.
Read-your-writes and monotonic reads answer those more specific questions. The distinction is useful because an application rarely asks only whether replicas will converge. It asks whether a saved profile can disappear on the next page, or whether a later read can show an older value. “Eventually consistent” leaves those questions open unless further guarantees are specified.
Reliable delivery, uncertain execution
Networking exposes a related problem: a guarantee can be carried beyond the layer where it applies.
The 1981 TCP specification describes reliable, ordered communication between processes. TCP detects losses and duplicates and reconstructs a byte stream. An application still has to interpret those bytes and perform the requested work.
Suppose a client asks a server to create an order. The server commits the order, then the connection fails before the reply reaches the client. The client knows it did not receive a successful reply. It does not know whether the order exists.
That uncertainty was already explicit in the 1988 RPC specification. Even over TCP, receiving no reply leaves the caller unable to conclude that the remote procedure did not execute. The transport’s reliability does not settle the application’s outcome.
Retrying introduces another question: will the server recognize the retry as the same operation? An application can use a durable request identifier and atomically record the result with the change, then return that result when the identifier appears again. But the scope matters. If handling the request also sends an email through another service, recording the database result does not by itself make the email part of the same atomic operation.
This is why “exactly once” needs an object. Once per delivered message, once per procedure execution, or one committed effect for a logical request? A useful specification says which of these it guarantees, how it recognizes retries, and which effects participate in the guarantee.
The missing qualification here is a boundary. In commit protocols, it is often a failure assumption.
Nonblocking, under conditions
Some disagreements are about a claim, not a word. Three-phase commit is the clearest.
Dale Skeen’s 1981 paper introduced it as a nonblocking commit protocol, and stated what it assumed: “the network never fails”, and it “can detect the failure of a site” and “reliably report this”. Two years later, Skeen and Michael Stonebraker proved the limit themselves: “There exists no protocol resilient to a network partitioning when messages are lost.”
Without bounds on delays, a timeout cannot reliably distinguish a failed machine from a slow machine or a delayed message. A claim that depends on reliable failure detection must therefore say how that detection is provided. A description of three-phase commit that omits communication failures leaves out the qualification most relevant to deploying it.
Calling the protocol nonblocking under its stated assumptions and rejecting it for a network that violates those assumptions can both be justified. The error comes when the assumptions disappear and either statement is presented as universal.
Gateway: the old word survives the rename
Sometimes the history is visible in the standard itself. The introduction to RFC 1812, Requirements for IP Version 4 Routers, explains that older Internet documents called routers gateways. By 1995, that usage had largely fallen out of favour to avoid confusion with application gateways. The OSI community had another name for these devices: intermediate systems.
The same RFC still discusses Interior Gateway Protocols and the Border Gateway Protocol. Renaming the device did not rename the surrounding vocabulary.
This is a relatively harmless case, but it makes the mechanism easy to see. A reader encounters words from several periods at once. Looking up each word in a modern glossary will not necessarily explain why an older document uses it differently.
Names can also spread through influential implementations, carrying a blurred distinction with them.
A citation that points at the wrong paper
The Dynamo paper, in 2007, says it “uses vector clocks in order to capture causality between different versions of the same object”, and cites Lamport’s 1978 paper on logical clocks. That paper describes scalar logical clocks, rather than the vector mechanism Dynamo uses. Later work developed vector clocks to capture causal ordering across processes.
The distinction that matters here is between tracking causal relationships among events and tracking the histories of replicated versions of an object. Vector clocks and version vectors use similar structures at different scopes. Friedemann Mattern, one of the inventors of vector clocks, pointed out the resemblance in 1988 and kept the names apart.
Dynamo was widely read, and its wording spread into the systems modelled on it. Riak, one of them, switched terms in 2015: “From here on, these logical clocks will be referred to as Version Vectors.”
Why the names stay
People have tried to fix this. Atul Adya’s 1999 thesis rebuilt the isolation levels formally, as cycles in a graph of dependencies between transactions, under new names. The definitions are the ones careful testing uses today. They are also one more set of names in circulation, next to the standard’s and each vendor’s.
The old names stay because they are short, because the standard and the manuals use them, and because they sell. A label is a claim that fits on a product page. The 1997 paper on cluster-based scalable network services described BASE broadly. It said “any data semantics that are not strictly ACID are BASE”, which is a slogan more than a definition. Brewer later called both acronyms “more mnemonic than precise”. A survey of 18 databases in 2013 found that only three were serializable by default, and eight did not offer serializability at all.
What has changed behaviour is testing. Kyle Kingsbury’s Jepsen project, which began in 2013, runs databases under failures and compares what happens with what the documentation says.
- TiDB claimed snapshot isolation and “allowed read skew and lost updates by default”. The default was changed.
- etcd’s documentation called its guarantee the strongest available from distributed systems, and was rewritten.
- PostgreSQL’s manual did not say that its repeatable read was snapshot isolation. Three days after the report, a commit added it: “Our documentation failed to point out that REPEATABLE READ is really snapshot isolation”.
These investigations did not establish a universal meaning for the labels. They made particular contracts more explicit, or exposed behaviour that violated them. That is progress a reader can use.
What I do now
I still learn the definitions. I have stopped expecting a familiar name to tell me which definition an author is using. Now I ask four questions:
- Whose definition is this? The standard’s, a paper’s, or a product’s.
- Under what assumptions? A reliable network, a single node, a strict or broad reading.
- Where does the guarantee apply? A memory operation, a transaction, a byte stream, or an effect in another service.
- What scenario does it rule out? Can two doctors each see the other on call and both go off duty? Can a timed-out order request have succeeded? Can retrying it create a second order?
Some apparent contradictions disappear once the definitions are restored. Others remain: a manual overstates a guarantee, a citation supports a different mechanism, or an implementation fails its own contract. History helps distinguish those cases.
When I return to the second book now, I look for the object, the boundary and the assumptions behind the word. That gives me something I can compare with the first book—and, eventually, with a running system.
A note on sources
The dates here identify particular publications and documented usages. They do not necessarily establish who first used a word or when an entire community adopted it. The account of Date and IBM using “repeatable read” for the strongest level comes from the 1995 critique; I have not independently checked the cited edition of Date’s textbook. Product-specific findings are tied to the documentation or tested versions linked above.
The historical sources matter because they preserve qualifications that summaries often lose. The 1988 RPC specification records uncertainty about execution. The 1995 router specification explains its own change in vocabulary. The isolation critique documents disagreement while the standards and implementations were still developing. Reading those passages makes the disagreement more concrete than a glossary can.