Failure Modes: When ACID and BASE Break Down
ACID Failure: Write Skew
Snapshot isolation (transactions see consistent snapshots) is vulnerable to write skew: two transactions read the same snapshot, pass checks, both commit, violating an invariant. Example: two transactions check at least one doctor on-call, both see two, both remove one, leaving zero. Fix: serializable isolation (transactions appear sequential) or explicit locking, adding 20-50% latency in high contention.
BASE Failure: Clock Skew
Last-writer-wins (LWW) uses timestamps, but clock skew can drop valid writes. If one replica clock is 2s ahead, a write at real-time T+2 can be dropped for a write at T with skewed later timestamp. Fix: logical clocks (counters per operation) or vector clocks (tracking causality), or application-level versioning with conditional writes.
Monotonic Read Violations
Eventual consistency shows "time travel": client reads fresh data, reads again, sees older data (hit stale replica). Session consistency pins reads to replicas at or ahead of a session token, preventing this but requiring sticky routing.
Hot Partition Problem
Hot partitions degrade both models. A viral item hits 1K writes/sec partition limit, pushing P99 from 10ms to 200ms+. ACID suffers lock queues. Fix: key salting or write sharding.