Repeatable read

The REPEATABLE_READ isolation level defines that if a transaction reads one record from the database multiple times, the results of all of those reading operations must be the same. This isolation helps us to prevent issues like dirty reads and non-repeatable reads, but it may create another issue.

Let's see the following diagram:

In this example, Transaction A reads a range of data. Simultaneously, Transaction B inserts new data in the same range that Transaction A initially fetched and commits. Later, Transaction A reads the same range again and will also get the record that Transaction B just inserted. This is a phantom ...

Get Hands-On High Performance with Spring 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.