Read committed and Snapshot isolations do not prevent Lost Updates


Last Updated on Feb 17, 2021

Read Committed Isolation and Snapshot Isolation provide guarantees to read-only transactions when concurrent writes happen in the background. They define visibility rules for values and guarantee that a transaction cannot see nor expose in-flight changes to the rest of the system.

But they do not sufficiently address write-write conflicts. An interesting write conflict is Lost Updates, where two transactions overwrite each other when they try to read a value, change it, and commit (read-modify-write cycle) concurrently.

Lost Updates can be prevented with Atomic Writes, Explicit Locks, or by using Compare-and-Set operations.


© 2022 Ambitious Systems. All Rights Reserved.