◀ THE FOLD0ROOT.AI // WORLD II · CO-OP · SPLIT SCREEN◆ .dlw.fold
THE FOLD / CO-OP / SPLIT SCREEN / THE WRITE SKEW

THE WRITE SKEW

no row was written twice
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Two doctors are on call. Each independently checks that someone else is on call, sees that there is, and goes off. Neither transaction touched a row the other wrote. Both are correct. Nobody is on call.

LIT verified live. enumerating all 20 interleavings of two three-step transactions under snapshot isolation, 18 of them — 90% — end with nobody on call. Run the same pair serially in either order and the second transaction sees the first’s commit, finds only one doctor on call, and declines: 1 on call both ways, 0 violations. The number that makes this hard to catch is 0: the count of rows written by both transactions. No write-write conflict exists in any of the 18 failing schedules, so a conflict detector watching writes sees a clean run.
2 HOW IT WAS WEAVED · AI + HUMAN
Write skew is Berenson, Bernstein, Gray, Melton, O’Neil and O’Neil (1995), the paper that showed the ANSI isolation levels do not say what people thought; serializable snapshot isolation is Cahill, Röhm and Fekete (2008).

AVAN (AI) counted the write conflicts rather than only the violations, because the violation is the symptom and the empty write intersection is the diagnosis. Snapshot isolation is defined to detect concurrent writes to the same row, and it does — correctly, every time. The invariant here is not a property of any row; it is a property of a set, and there is no row on which to notice its breach. The first model built here used the wrong predicate and reported violations everywhere including the serial orders, which was the clue that the model, not the isolation level, was broken.
3 ONE DIMENSION
20 interleavings. 18 break it. 0 write conflicts.
4 TWO DIMENSIONS · INTERACTIVE
Walk a schedule and watch both snapshots agree it is safe.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object.
AVAN’s addition (the inverse-companion): the forward reading is that snapshot isolation is too weak. The inverse is that the isolation level is doing exactly what it promised and the promise was about rows. Every concurrency control here is a conflict detector, and a detector needs somewhere to put the conflict; write skew has no such place, because the two transactions agree about every row they touch and disagree only about a sentence — ‘at least one is on call’ — that is written down nowhere in the database. Read backwards, an invariant the schema does not represent cannot be defended by any mechanism that watches the schema.
LIT enumerating all 20 interleavings of two three-step transactions under snapshot isolation, 18 of them - 90% - end with nobody on call, while running the same pair serially in either order lets the second transaction see the first's commit, find only one doctor on call and decline: 1 on call both ways, 0 violations; and the number that makes this hard to catch is 0, the count of rows written by both transactions, so no write-write conflict exists in any of the 18 failing schedules and a conflict detector watching writes sees a clean run

FIG Write skew is Berenson, Bernstein, Gray, Melton, O'Neil and O'Neil (1995), the paper that showed the ANSI isolation levels do not say what people thought; serializable snapshot isolation is Cahill, Rohm and Fekete (2008). AVAN counted the write conflicts rather than only the violations, because the violation is the symptom and the empty write intersection is the diagnosis. The first model built here used the wrong predicate and reported violations everywhere including the serial orders, which was the clue that the model, not the isolation level, was broken.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SPLIT SCREEN · David Lee Wise (ROOT0), with AVAN