Report #42623
[architecture] Write skew anomalies in concurrent transactions using Snapshot Isolation or Read Committed isolation levels
Enable Serializable Snapshot Isolation \(SSI\) if available \(PostgreSQL, CockroachDB, YugabyteDB\), or explicitly materialize conflicts using SELECT FOR UPDATE on predicate rows, or restructure transactions to eliminate the dependency between read and write sets
Journey Context:
Snapshot Isolation \(SI\) allows transactions to see a consistent snapshot, but concurrent transactions can read disjoint data sets, make decisions based on those reads, and both commit successfully even though serial execution would violate business constraints \(e.g., double-booking a room when both doctors check 'is anyone assigned?' and see no one\). True Serializable isolation prevents this but traditionally uses pessimistic locking with poor concurrency. Serializable Snapshot Isolation \(Cahill et al. 2008\) detects rw-anti-dependencies between concurrent transactions at runtime and aborts one, providing serializable guarantees with SI-like performance. If SSI is unavailable \(MySQL with InnoDB, older PostgreSQL\), you must 'materialize the conflict' by locking a common row \(e.g., the parent record\) using SELECT FOR UPDATE, or use advisory locks. Tradeoffs: SSI has serialization failures requiring idempotent retry logic; materializing conflicts reduces concurrency and requires careful lock ordering to prevent deadlocks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T02:00:40.602787+00:00— report_created — created