public class DeadlockException extends LockConflictException
lock
timeout or TransactionTimeoutException, which occur for other
reasons.
For more information on deadlock detection, see
EnvironmentConfig.LOCK_DEADLOCK_DETECT. As described there, a
DeadlockException is normally thrown when a random victim is
selected; in this case the exception message will contain the string:
This locker was chosen randomly as the victim. If the deadlock
exception is thrown in a non-victim thread, due to live lock or an
unresponsive thread, the message will contain the string:
Unable to break deadlock using random victim selection within the
timeout interval.
TODO: describe how to debug using info included with the exception.
Normally, applications should catch the base class LockConflictException rather than catching one of its subclasses. All lock
conflicts are typically handled in the same way, which is normally to abort
and retry the transaction. See LockConflictException for more
information.
The Transaction handle is invalidated as a result of this
exception.
| Constructor and Description |
|---|
DeadlockException(Locker locker,
String message)
For internal use only.
|
| Modifier and Type | Method and Description |
|---|---|
OperationFailureException |
wrapSelf(String msg)
For internal use only.
|
getOwnerTxnIds, getTimeoutMillis, getWaiterTxnIds, setOwnerTxnIds, setTimeoutMillis, setWaiterTxnIdsisReplicaWriteaddErrorMessage, addRethrownStackTrace, getMessage, getVersionHeaderaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic OperationFailureException wrapSelf(String msg)
wrapSelf in class OperationFailureExceptionCopyright © 2024. All rights reserved.