Write Skew
Write skew is a snapshot-isolation anomaly: two transactions each perform conditional checks on a consistent snapshot then write different rows; combined, the constraint is violated.
Purpose
To understand why snapshot isolation does not guarantee serializability and identify the anomaly SSI must detect.
Mechanism
Classic example: the on-call constraint requires at least one doctor on call. T1 reads both on call and takes A off; T2 reads both on call and takes B off. Each snapshot satisfies the constraint, but combined nobody is on call. SSI detects read dependencies and rolls back.
Use cases
- SSI anomaly detection
- Snapshot isolation limits
- Concurrent constraint analysis