liveBook · Manning

Read committed isolation level

As explained in Java Persistence with Spring Data and Hibernate epub

Read committed isolation is a transaction isolation level that prevents dirty reads and lost updates while allowing unrepeatable and phantom reads.

Read committed isolation prevents dirty reads and lost updates while allowing unrepeatable reads and phantom reads during concurrent transaction execution. section 11.2.1

Its behavior can be summarized as follows:

  • Blocks a transaction from reading data written by an uncommitted transaction. section 11.2.1
  • Prevents two transactions from producing lost updates. section 11.2.1
  • Allows a repeated query to observe changed values or newly matching rows after another transaction commits. section 11.2.1
  • May use shared read locks and exclusive write locks, although locking strategies vary by database vendor. section 11.2.1
Table 11.1 ANSI isolation levels and the problems that they address (view table figure)

Isolation level

Phantom read

Unrepeatable read

Dirty read

Lost update

READ_UNCOMMITTED

–

–

–

+

READ_COMMITTED

–

–

+

+

REPEATABLE_READ

–

+

+

+

SERIALIZABLE

+

+

+

+

Compare read committed with read uncommitted, repeatable read, and serializable isolation across dirty reads, lost updates, unrepeatable reads, and phantom reads. section 11.2.1

How Java Persistence with Spring Data and Hibernate epub covers it

How deep it goes
Defines the permitted anomalies and sketches lock-based implementation, but defers database-specific locking strategies.
Examples
Uses lost-update, dirty-read, unrepeatable-read, and phantom-read figures plus an ANSI isolation-level comparison table.
What it assumes
Assumes transactions and concurrent access, while defining isolation anomalies and standard isolation levels.
What you can do after
Evaluate transaction isolation choices by comparing prevented anomalies, permitted anomalies, locking behavior, and performance costs.
How it connects
Connects transaction isolation with dirty reads, lost updates, unrepeatable reads, phantom reads, locking, repeatable read, and serializable isolation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Java Persistence with Spring Data and Hibernate epub. The section links point to the parts of the book it draws on.