Transaction Isolation and Safe Database Retries
Database transactions make groups of reads and writes atomic, but atomicity alone does not answer what concurrent transactions are allowed to observe. That is the job of isolation.
The practical challenge appears when correct transactions conflict. Strong isolation can intentionally abort one transaction rather than allow an invalid interleaving. Applications need to distinguish those retryable concurrency failures from ordinary errors.
Isolation protects invariants, not just statements Consider two concurrent requests that reserve the last available item.