A dirty read observes data written by a transaction that later aborts.

highlighted = computed this step

Dirty read

A dirty read happens when one transaction reads a value written by another transaction that later aborts. The trace still records what the reader saw at that moment. Note: rollback changes the final state but not the recorded read.

dirty read\text{dirty read}

Uncommitted value

The trace has 1 recomputed read. Note: the read annotation shows the value observed before the abort.

reads=1\text{reads}=1

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.

Dirty read T1 T2 0 W(X,200) 1 R(X)=200 2 abort anomaly: dirty_read final: X=100 serial: X=100

Rollback contrast

The final state has 1 item after rollback. Note: the anomaly label is rendered from preserved read provenance.

final items=1\text{final items}=1

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.

Dirty read T1 T2 0 W(X,200) 1 R(X)=200 2 abort anomaly: dirty_read final: X=100 serial: X=100

Summary

Dirty reads are about seeing data that does not survive. Note: isolation levels, serializable behavior, and MVCC mechanisms are deferred to later books.

dirty read summary\text{dirty read summary}