public class IsolatedLeader extends AbstractLeader
If the reply from the majority of the followers is not received then the leader changes its behavior to IsolatedLeader. An isolated leader may have followers and they would continue to receive replicated messages.
A schedule is run, at an interval of (10 * Heartbeat-time-interval), in the Leader to check if its isolated or not.
In the Isolated Leader , on every AppendEntriesReply, we aggressively check if the leader is isolated. If no, then the state is switched back to Leader.
context, log
Constructor and Description |
---|
IsolatedLeader(RaftActorContext context) |
Modifier and Type | Method and Description |
---|---|
protected RaftActorBehavior |
handleAppendEntriesReply(akka.actor.ActorRef sender,
AppendEntriesReply appendEntriesReply)
Derived classes should not directly handle AppendEntriesReply messages it
should let the base class handle it first.
|
addFollower, beforeSendHeartbeat, close, followerLogSize, getFollower, getFollowerIds, getLeaderId, getLeaderPayloadVersion, getMinIsolatedLeaderPeerCount, handleAppendEntries, handleMessage, handleRequestVoteReply, initiateCaptureSnapshot, isLeaderIsolated, printFollowerStates, removeClientRequestTracker, removeFollower, sendAppendEntries, updateMinReplicaCount
actor, appendEntries, applyLogToStateMachine, canGrantVote, canStartElection, createBehavior, currentTerm, electionDuration, getId, getLogEntryIndex, getLogEntryOrSnapshotTerm, getLogEntryTerm, getMajorityVoteCount, getReplicatedToAllIndex, internalSwitchBehavior, internalSwitchBehavior, lastIndex, lastTerm, logName, performSnapshotWithoutCapture, requestVote, scheduleElection, setReplicatedToAllIndex, state, stopElection, switchBehavior, votedFor
public IsolatedLeader(RaftActorContext context)
protected RaftActorBehavior handleAppendEntriesReply(akka.actor.ActorRef sender, AppendEntriesReply appendEntriesReply)
AbstractRaftActorBehavior
handleAppendEntriesReply
in class AbstractLeader
sender
- The actor that sent this messageappendEntriesReply
- The AppendEntriesReply messageCopyright © 2019 OpenDaylight. All rights reserved.