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.

anomaly: write_skew; final: X=0,Y=0; serial: X=0,Y=1; constraint X+Y>=1 holds: false; serial holds: truestepT1T20R(X)=11R(Y)=12R(X)=13R(Y)=14W(X,0)5W(Y,0)

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.

anomaly: write_skew; final: X=0,Y=0; serial: X=0,Y=1; constraint X+Y>=1 holds: false; serial holds: truestepT1T20R(X)=11R(Y)=12R(X)=13R(Y)=14W(X,0)5W(Y,0)

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}