Write skew breaks a cross-item constraint with overlapping reads and disjoint writes.

highlighted = computed this step

Write skew

Write skew comes from overlapping reads but disjoint writes. Each transaction sees a state that looks acceptable, then they write different items. Note: the cross-item constraint and both outcomes are rendered.

write skew\text{write skew}

Overlapping reads

The compiled trace has 4 reads before the disjoint writes. Note: the overlap is visible in the timeline.

reads=4\text{reads}=4

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.

Write skew T1 T2 0 R(X)=1 1 R(Y)=1 2 R(X)=1 3 R(Y)=1 4 W(X,0) 5 W(Y,0) anomaly: write_skew final: X=0,Y=0 serial: X=0,Y=1 constraint X+Y>=1 holds: no

Serial baseline

The interleaved final state has 2 items, and the derived serial final state has 2 items. Note: the serial baseline is derived by the engine from the same operations.

interleaved items=2,serial items=2\text{interleaved items}=2,\quad \text{serial items}=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.

Write skew T1 T2 0 R(X)=1 1 R(Y)=1 2 R(X)=1 3 R(Y)=1 4 W(X,0) 5 W(Y,0) anomaly: write_skew final: X=0,Y=0 serial: X=0,Y=1 constraint X+Y>=1 holds: no

Summary

Write skew is about a cross-item rule broken by an interleaving with disjoint writes. Note: isolation levels, serializable behavior, and MVCC mechanisms are deferred to later books.

cross item anomaly\text{cross item anomaly}