A non-repeatable read observes different values for the same item in one transaction.

highlighted = computed this step

Non-repeatable read

A non-repeatable read appears when the same transaction reads the same item twice and gets different values. The change comes from a committed write between those reads. Note: both read annotations are recomputed from the trace.

non repeatable read\text{non repeatable read}

First read

The trace has 2 reads by the time the anomaly is classified. Note: the first read establishes the comparison point.

reads=2\text{reads}=2

these traces model specific anomalies under a read-latest-write execution model; isolation levels (RC/RR/SI/serializable) and MVCC mechanism are modelled later - no product claims.

Non repeatable read T1 T2 0 R(X)=100 1 W(X,120) 2 commit 3 R(X)=120 anomaly: non_repeatable_read final: X=120 serial: X=120

Second read

Those reads contain 2 distinct returned values. Note: the label appears only after the second read disagrees.

distinct read values=2\text{distinct read values}=2

these traces model specific anomalies under a read-latest-write execution model; isolation levels (RC/RR/SI/serializable) and MVCC mechanism are modelled later - no product claims.

Non repeatable read T1 T2 0 R(X)=100 1 W(X,120) 2 commit 3 R(X)=120 anomaly: non_repeatable_read final: X=120 serial: X=120

Summary

Non-repeatable read is a same-transaction stability failure. Note: isolation levels, serializable behavior, and MVCC mechanisms are deferred to later books.

same item changes\text{same item changes}