public interface IndeterminateOperationStateAware
RaftOp
is replicated to the leader of a Raft group,
but the leader fails before it sends any response, the caller has no idea
about the status of its operation. The possible cases are:
- the failed leader did not append the operation,
- the failed leader appended the operation but not committed yet,
- the failed leader committed the operation.
In this case, we check if the operation is safe to retry. The operation is
considered to be safe to retry only if it implements this interface and
isRetryableOnIndeterminateOperationState()
method returns
true
. If this is the case, the operation will be retried. Otherwise,
we do not know if the operation is safe or not. In this case, we make a
decision between offering at-most-once and at-least-once execution
semantics via the
CPSubsystemConfig.failOnIndeterminateOperationState
configuration.
If this configuration is enabled, we do not retry the operation and fail
with IndeterminateOperationStateException
, hence offer at-most-once
semantics. Otherwise, we retry the operation and we are fine with a possible
duplicate commit of the operation.Modifier and Type | Method and Description |
---|---|
boolean |
isRetryableOnIndeterminateOperationState()
Returns true if duplicate commit of the operation is equivalent to
committing it only once.
|
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.