← Graph

Optimistic Locking

concept 3 connections

Solution to the lost-update / mid-air-collision race condition that arises when multiple senders can change the same resource. The protocol adds a version parameter: a read returns the current version, and any change request carries the version the sender based its decision on. The receiver rejects the request if the version is stale, giving the sender an opportunity to re-read and retry from the beginning. Easy to apply to protocols and the recommended solution for many communication patterns, including DELETE operations with concurrent updaters.

category
pattern
Presented as the protocol-level solution to lost-update races on PUT/DELETE.
about
Optimistic Locking concept
Answer applies optimistic locking (version 0) to POST retries.
concept Optimistic Locking
related_to
Optimistic locking is the prescribed solution to the lost-update race.

Provenance

Read by
2 extractions