Part 3 of 5 · 1 min read
Thomas' write rule
A specific case where an out-of-order write can be safely ignored rather than rejected, since it would be immediately overwritten anyway.
Think of two people writing on the same whiteboard. If someone jots an outdated note after a newer note has already been written in the same spot, simply ignoring the outdated note causes no harm at all. It would never have been the final visible value anyway.
In plain words: Thomas' write rule is a refinement of plain timestamp ordering specifically for the case of two writes, not a read followed by a write. If a transaction attempts a write that is older than the most recent write already recorded for that item, plain timestamp ordering would reject the transaction outright. Thomas' write rule instead simply ignores that specific outdated write, letting the transaction continue, since an older write would have been immediately overwritten by the newer one anyway and never actually observed by any reader.
A worked example. If transaction A's write to a row, timestamped earlier, arrives after transaction B's write to the same row, timestamped later, Thomas' write rule simply discards A's write rather than rejecting transaction A entirely, since A's value would never have been visible to any reader regardless.
The key lines. No new SQL; Thomas' write rule is an internal refinement some timestamp-ordering implementations apply specifically to out-of-order writes.
Thomas' write rule
Thomas' write rule ignores, rather than rejects, an out-of-order write to a data item when a newer write has already been recorded for it, since the outdated write would never have been visible to any reader anyway.
Example: ignoring an outdated whiteboard note written after a newer note already occupies the same spot mirrors Thomas' write rule discarding a stale write.