JEPSEN

G1b (Intermediate Read)

Phenomenon G1b (Intermediate Read) occurs when a committed transaction observes an intermediate state produced by another transaction. Specifically, transaction Ti writes at least two versions of object x: some version xintermediate, and its last write to x, xfinal. Committed transaction Tj then reads xintermediate. G1b is legal under Read Uncommitted, but proscribed by Read Committed.

For example, imagine Ti sets x to 1, then 2. Transaction Tj reads x = 1 and commits. Intermediate state has leaked out of Ti.1

Note that G1b only constrains the reads of committed transactions; uncommitted transactions may read whatever they like.

If writes are arbitrary transformations of values (rather than blind writes), this definition of G1b is insufficient. Imagine an aborted transaction Ti writes an intermediate version xi, and a committed transaction Tj writes xj = f(xi). Finally, a committed transaction Tk reads xj. Clearly, intermediate state has leaked from Ti into Tk, but no G1b has occurred. We could resolve this by considering every write an implicit read: Ti and Tj would therefore constitute G1b. Jepsen opts to call this phenomenon Intermediate Update.

Formally

G1b is defined in Adya’s thesis, section 3.2.2:

G1b: Intermediate Reads. A history H exhibits phenomenon G1b if it contains a committed transaction Tj that has read a version of object x (maybe via a predicate) written by transaction Ti that was not Ti’s final modification of x.

See Also

Intermediate Read is a (less obvious) aspect of the ANSI SQL anomaly P1 (Dirty Read). However, P1 has two interpretations: one allows non-Serializable histories, and the other rules out Serializable histories. Adya’s G1 captures the spirit of P1 in three general, precise phenomena: G1a (Aborted Read), G1b (Intermediate Read), and G1c (Cyclic Information Flow). Ruling out all three ensures Read Committed.


  1. We assume no other transaction writes x = 1.