PrepZone Logo
PrepZone
Back to Spring Boot

Spring Boot · Medium

What is dirty read, non-repeatable read, and phantom read?

Spring BootJPA & TransactionsIsolation LevelsSeniorStaff

Answer preview

Dirty Read: Transaction A reads data written by Transaction B, which hasn't committed yet. If B rolls back, A has read invalid data. Example: T1 updates salary to 10000 (not yet committed); T2 reads salary = 10000; T1 rolls back; T2 used wrong value.…