Lost Update
A lost update occurs when two transactions read the same old value, compute independently, and write back — the later write overwrites the earlier one, losing it.
Purpose
To recognize concurrent lost-update problems and choose the correct optimistic concurrency control strategy.
Mechanism
T1 reads X=100, T2 reads X=100, T1 writes X=110, T2 writes X=120. T1 update is overwritten and lost. Defenses: SELECT FOR UPDATE, version-number checks, CAS atomic operations.
Use cases
- Concurrent update defense
- Optimistic locking design
- CAS pattern