X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2Fbehaviors%2FIsolatedLeader.java;h=9ba39c2fcc456bf5b9a2ad528d411ef99e81abd6;hb=bfe4439155b27fbf9ae300252420c8a81fcbdb80;hp=a02e40092b3e314ee83bf0ae10e5a70e7106abea;hpb=a0b8be5ce48c0d1e0b573d1952211913c58d4935;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/IsolatedLeader.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/IsolatedLeader.java index a02e40092b..9ba39c2fcc 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/IsolatedLeader.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/IsolatedLeader.java @@ -15,16 +15,18 @@ import org.opendaylight.controller.cluster.raft.messages.AppendEntriesReply; /** * Leader which is termed as isolated. - *

+ * + *

* 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. - * */ public class IsolatedLeader extends AbstractLeader { IsolatedLeader(RaftActorContext context, @Nullable AbstractLeader initializeFromLeader) { @@ -44,7 +46,7 @@ public class IsolatedLeader extends AbstractLeader { // it can happen that this isolated leader interacts with a new leader in the cluster and // changes its state to Follower, hence we only need to switch to Leader if the state is still Isolated if (ret.state() == RaftState.IsolatedLeader && !isLeaderIsolated()) { - LOG.info("IsolatedLeader {} switching from IsolatedLeader to Leader", getLeaderId()); + log.info("IsolatedLeader {} switching from IsolatedLeader to Leader", getLeaderId()); return internalSwitchBehavior(new Leader(context, this)); } return ret;