Non-Repeatable Read
A non-repeatable read is when the same transaction reads the same row twice and gets different values (another transaction committed a modification); an anomaly still present at read committed.
Purpose
To distinguish non-repeatable reads from phantom reads and understand the value of repeatable-read isolation.
Mechanism
Transaction A reads row X twice; transaction B modifies and commits X in between, so A sees different values. Versus phantom read: a non-repeatable read changes row content, a phantom read changes row count. Repeatable read and above prevent it.
Use cases
- Concurrency anomaly analysis
- Isolation level selection
- Transaction consistency