Lost update anomaly
A lost update anomaly is a concurrency error in which one modification to shared data overwrites or fails to incorporate another modification.
Java Persistence with Spring Data and Hibernate epub
A lost update occurs when one concurrent transaction overwrites another transaction's committed modification without detecting the conflict.
- How it is used
- Uses lost updates to explain the consequences of weakened transaction isolation and motivate concurrency control.
- How deep it goes
- Traces competing reads and writes, then shows version checking at flush and limitations of dirty-property checks.
- Examples
- Uses competing buyNowPrice changes and a versioned Item update that throws an OptimisticLockException.
- What you can do after
- Apply optimistic concurrency control through Java Persistence versioning to detect conflicting updates.
Read how Java Persistence with Spring Data and Hibernate epub explains lost update anomaly →
Microservices Patterns, Second Edition
A concurrency anomaly in which one update overwrites another update made from the same previously read data without detecting the conflict.
- How it is used
- Diagnoses how concurrent sagas can produce inconsistent outcomes despite correctly implemented local transactions.
- How deep it goes
- Defines the overwrite conflict and illustrates its consequences in concurrent sagas without detailing a prevention procedure.
- Examples
- Uses concurrent Create Order and Cancel Order sagas, where an overwrite accompanies credit being released without reservation.
- What you can do after
- Understand how concurrent saga execution can overwrite updates and violate business invariants.
Read how Microservices Patterns, Second Edition explains lost update anomaly →
The Coder Cafe
A lost update is a concurrency anomaly in which one transaction's write overwrites another transaction's write based on an earlier shared value.
- How it is used
- Diagnoses incorrect results from concurrent transactions that overwrite one another’s updates.
- How deep it goes
- Defines the anomaly, traces it through a banking scenario, and explains snapshot-isolation conflict handling.
- Examples
- Uses concurrent deposits into Alice’s bank account, producing $200 instead of the expected $300.
- What you can do after
- Evaluate isolation levels for preventing lost updates while balancing consistency guarantees against concurrency performance.
Also covered in
What to know first
- threadA thread is a distinct sequence of execution with its own control flow and state, managed or scheduled by a processor, runtime, or operating system.
- database transactionA database transaction is a bounded unit of database operations whose changes are treated as one logical whole, typically committed or rolled back together.
Related concepts
- synchronizationaddressed by · Synchronization is the coordination of concurrent activities, events, or system states to establish required ordering, alignment, access, or consistency relationships.
- serialization anomalykind of · A serialization anomaly is an outcome of concurrent operations that cannot be explained by any serial execution order.
- commutative updateaddressed by · A commutative update is an update operation designed to produce an equivalent result regardless of the order in which compatible updates execute.
- snapshot isolationaddressed by · Snapshot isolation is a transaction-isolation method in which each transaction reads a consistent versioned snapshot of committed data while concurrent writes are isolated from that view.
- synchronizedaddressed by · In Java, synchronized is a language construct that acquires an object's monitor to provide mutually exclusive access to a method or block of code.
Questions about lost update anomaly
What is lost update anomaly?
A lost update anomaly is a concurrency error in which one modification to shared data overwrites or fails to incorporate another modification.
Which Manning books explain lost update anomaly?
Java Persistence with Spring Data and Hibernate epub, Microservices Patterns, Second Edition and The Coder Cafe.
What should I know before learning lost update anomaly?
Manning books that teach lost update anomaly usually introduce thread and database transaction first.
What is lost update anomaly a kind of?
Lost update anomaly is a kind of serialization anomaly. A serialization anomaly is an outcome of concurrent operations that cannot be explained by any serial execution order.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


