Class IndeterminateStateException

  • All Implemented Interfaces:
    Serializable

    public class IndeterminateStateException
    extends RaftException
    A Raft leader may demote to the follower role after it appends an entry to its local Raft log, but before discovering its commit status. In some of these cases, which cause this exception to be thrown, it may happen that the Raft node cannot determine if the operation is committed or not. In this case, the CompletableFuture objects returned for these operations are notified with this exception.

    It is up to the clients to decide on retry upon receiving this exception. If the operation is retried either on the same or different Raft node, it could be committed twice, hence causes at-least-once execution. On the contrary, if RaftNode.replicate(Object) is not called again, then at-most-once execution happens.

    Idempotent operations can be retried on indeterminate situations.

    See Also:
    Serialized Form
    • Constructor Detail

      • IndeterminateStateException

        public IndeterminateStateException()
      • IndeterminateStateException

        public IndeterminateStateException​(RaftEndpoint leader)