public class RollbackException extends RestartRequiredException
Replica's log is ahead of the current
Master, and in this case, the
Replicawas unable to rollback without a recovery. As a consequence, it is possible that one or more of the most recently committed transactions may need to be rolled back, before the
Replicacan synchronize its state with that of the current
Master. Note that any CommitTokens obtained before restarting this
Replicashouldn't be used after
RollbackExceptionis thrown because the token may no longer exist on the current
Masternode, due to failover processing.
ReplicatedEnvironment, and consequently
handles, are invalidated as a result of this exception. The application must
close all old handles and create new handles before it can proceed. The
actual rollback of any recently committed transactions is done when the
application re-instantiates and thereby reopens the
ReplicatedEnvironment. The application is responsible for discarding and
recreating any transient state that may be associated with the committed
transactions that were rolled back.
getEarliestTransactionCommitTime() provide information to help
determine which transactions might be rolled back. Note that it is possible
that no committed transactions have been rolled back and that the
application need do no adjustments, in which case
getEarliestTransactionCommitTime() will return null.
This exception should be encountered relatively infrequently in practice,
since the election mechanism favors nodes with the most advanced log when
deciding upon a master. The exception, due to its nature, can only be
encountered when the node is in the
Replica state, or the node
is trying to transition to the
|Modifier and Type||Method and Description|
Testing support only.
Testing support only.
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public Long getEarliestTransactionCommitTime()
public long getEarliestTransactionId()
Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved.