Spring provides a transaction isolation level of 5:
- Isolation_default: Use the default isolation level of the database backend.
- Isolation_read_uncommitted: Allows reading of data changes that have not yet been committed. may result in dirty reads, Phantom reads, or non-repeatable reads.
- Isolation_read_committed: Allows reading of data that has been committed by a concurrent transaction. Can prevent dirty reading, but the Phantom read or non-repeatable reading still has Ken can happen.
- Isolation_repeatable_read: The results of multiple reads of the same field are consistent. Unless the data is modified by the transaction itself, dirty reads and non-repeatable reads can be prevented, but Phantom reads can still occur.
- Isolation_serializable: Full compliance with acid isolation level. Ensure that dirty reads, non-repeatable reads, and Phantom reads are blocked. This is the slowest transaction isolation level because it is typically implemented by fully locking transaction-related database tables.
Spring Essay-Transaction ISOLATION LEVEL