Backend & systems·Transactions and isolation
two transactions each check the same rule, each sees it satisfied, each writes a different row, and together they break the rule.
Write skew
An anomaly where concurrent transactions read an overlapping set, write disjoint rows, and jointly violate an invariant neither violated alone. The canonical case is two doctors both going off call because each saw the other on call. Snapshot isolation permits it; only serialisable or explicit locking of the read set prevents it.