liveBook · Manning

Optimistic concurrency control

Optimistic concurrency control is a concurrency-control technique that allows operations to proceed with limited locking and detects conflicting changes through validation before committing updates.

How 3 Manning books explain it

Java Persistence with Spring Data and Hibernate epub

Optimistic concurrency control detects conflicting updates by checking that data has not changed since it was read, typically through version information.

How it is used
Detects infrequent concurrent modifications late in a unit of work to support first-commit-wins behavior.
How deep it goes
Explains automatic version checks at flush and demonstrates explicit optimistic lock modes and alternative mappings.
Examples
Uses an item update, a price-total query, and a bid operation to illustrate conflict checks.
What you can do after
Apply it via JPA and Hibernate using version properties and explicit optimistic lock modes.

Read how Java Persistence with Spring Data and Hibernate epub explains optimistic concurrency control →

Data-Oriented Programming: Reduce software complexity

Optimistic concurrency control is a concurrency-control technique that allows operations to proceed without locking and detects or reconciles conflicts before committing changes.

How it is used
Manages concurrent mutations while preserving high read and write throughput without locking.
How deep it goes
Explains calculation, commit, fast-forward, three-way merge, structural differences, and aborts, but defers thread-safe implementation.
Examples
Uses immutable hash maps, path-based three-way merging, Git branch merging, and Elasticsearch as concrete reference points.
What you can do after
Apply it via a commit-phase reconciliation algorithm that merges safe changes and aborts irreconcilable mutations.

Read how Data-Oriented Programming: Reduce software complexity explains optimistic concurrency control →

Architecting an Apache Iceberg Lakehouse

A concurrency-control approach that allows operations to proceed without locks and detects conflicts when changes are committed.

How it is used
Coordinates concurrent Iceberg writes while preserving consistent table snapshots without distributed locks.
How deep it goes
Explains atomic compare-and-swap, conflict conditions, retries, and metadata tradeoffs without descending into implementation code.
Examples
Uses concurrent partition appends, overlapping overwrites, streaming micro-batches, and sequence-number checks as concrete examples.
What you can do after
Diagnose commit conflicts, configure retry and backoff behavior, and balance freshness against metadata growth.

Read how Architecting an Apache Iceberg Lakehouse explains optimistic concurrency control →

Also covered in

What to know first

Related concepts

Questions about optimistic concurrency control

What is optimistic concurrency control?

Optimistic concurrency control is a concurrency-control technique that allows operations to proceed with limited locking and detects conflicting changes through validation before committing updates.

Which Manning books explain optimistic concurrency control?

Java Persistence with Spring Data and Hibernate epub, Data-Oriented Programming: Reduce software complexity and Architecting an Apache Iceberg Lakehouse.

What should I know before learning optimistic concurrency control?

Manning books that teach optimistic concurrency control usually introduce database transaction, concurrency, consistency and locking first.

What is the difference between optimistic concurrency control and distributed lock?

Optimistic concurrency control is a concurrency-control technique that allows operations to proceed with limited locking and detects conflicting changes through validation before committing updates. A distributed lock is a coordination mechanism that grants mutually exclusive access to a shared resource among processes or machines in a distributed system.

What kinds of optimistic concurrency control are there?

Kinds of optimistic concurrency control include multi-version concurrency control.

What is optimistic concurrency control a kind of?

Optimistic concurrency control is a kind of lock-free. Lock-free is a concurrency progress guarantee under which at least one operation completes within a finite number of steps despite contention, without relying on mutual-exclusion locks.

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.