Package io.delta.kernel.exceptions
Class CommitStateUnknownException
Object
Throwable
Exception
RuntimeException
io.delta.kernel.exceptions.CommitStateUnknownException
- All Implemented Interfaces:
Serializable
Exception thrown when the Delta transaction commit system cannot determine whether a previous
commit attempt succeeded or failed, making it unsafe to continue with automatic retries.
This exception occurs in a specific sequence during transaction commit retries:
- First commit attempt fails with a retryable, non-conflict exception (e.g., IOException)
- Second commit attempt fails with a conflict exception (e.g., FileAlreadyExistsException)
In this scenario, the system cannot determine whether the first attempt actually wrote the commit file successfully but failed to report success, or whether the commit file was never written.
Since the system cannot distinguish between these cases, it cannot safely determine whether to retry at the current version or advance to version N+1.
Resolution: When this exception occurs, manual intervention is required to:
- Examine the commit history to determine if the first attempt actually succeeded
- If the commit succeeded, avoid retrying to prevent duplicate records
- If the commit failed, retry the operation from the beginning
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCommitStateUnknownException(long commitVersion, int commitAttempt, CommitFailedException cfe) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CommitStateUnknownException
public CommitStateUnknownException(long commitVersion, int commitAttempt, CommitFailedException cfe)
-