IsolationLevel¶
IsolationLevel
is an abstraction of consistency guarantees to be provided when OptimisticTransaction
is committed.
Implementations¶
Sealed Trait
IsolationLevel
is a Scala sealed trait which means that all of the implementations are in the same compilation unit (a single file).
Serializable¶
Serializable
is the most strict consistency guarantee.
Serializable
is the isolation level for data-changing commits.
For Serializable
commits, OptimisticTransactionImpl
adds extra addedFilesToCheckForConflicts
(changedData
or blindAppend
AddFiles) when checkForConflicts.
Serializable
is a valid table isolation level.
For operations that do not modify data in a table, there is no difference between Serializable and SnapshotIsolation.
Serializable
is used for ConvertToDeltaCommand command.
SnapshotIsolation¶
SnapshotIsolation
is the least strict consistency guarantee.
SnapshotIsolation
is the isolation level for commits with no data changed.
For SnapshotIsolation
commits, OptimisticTransactionImpl
adds no extra addedFilesToCheckForConflicts
when checkForConflicts.
For operations that do not modify data in a table, there is no difference between Serializable and SnapshotIsolation.
WriteSerializable¶
The default IsolationLevel
For WriteSerializable
commits, OptimisticTransactionImpl
adds extra addedFilesToCheckForConflicts
(changedData
AddFiles) when checkForConflicts. Blind appends don't (seem to) conflict with WriteSerializable
commits.
WriteSerializable
a valid table isolation level.
Consistency Guarantee Strictness Ordering¶
The following are all the isolation levels in descending order of guarantees provided:
- Serializable (the most strict level)
- WriteSerializable
- SnapshotIsolation (the least strict one)
Valid Table Isolation Levels¶
Not Used in OSS Delta Lake
This feature is not used.
The following are the valid isolation levels that can be specified as the table isolation level: