Package io.delta.kernel.internal.replay
Class ConflictChecker
Object
io.delta.kernel.internal.replay.ConflictChecker
Class containing the conflict resolution logic when writing to a Delta table.
Currently, the support is to allow blind appends. Later on this can be extended to add support for read-after-write scenarios.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass containing the rebase state from winning transactions that the current transaction needs to rebase against before attempting the commit. -
Method Summary
Modifier and TypeMethodDescriptionresolveConflicts(Engine engine) resolveConflicts(Engine engine, SnapshotImpl snapshot, long attemptVersion, TransactionImpl transaction) Resolve conflicts between the losing transaction and the winning transactions and return a rebase state that the losing transaction needs to rebase against before attempting the commit.
-
Method Details
-
resolveConflicts
public static ConflictChecker.TransactionRebaseState resolveConflicts(Engine engine, SnapshotImpl snapshot, long attemptVersion, TransactionImpl transaction) throws ConcurrentWriteException Resolve conflicts between the losing transaction and the winning transactions and return a rebase state that the losing transaction needs to rebase against before attempting the commit.- Parameters:
engine-Engineinstance to usesnapshot-SnapshotImplof the table when the losing transaction has startedtransaction-TransactionImplthat encountered the conflict (a.k.a the losing transaction)- Returns:
ConflictChecker.TransactionRebaseStatethat the losing transaction needs to rebase against- Throws:
ConcurrentWriteException- if there are logical conflicts between the losing transaction and the winning transactions that cannot be resolved.
-
resolveConflicts
public ConflictChecker.TransactionRebaseState resolveConflicts(Engine engine) throws ConcurrentWriteException - Throws:
ConcurrentWriteException
-