BUG 4212 : Follower should not reschedule election timeout in certain cases. 11/26111/5
authorMoiz Raja <moraja@cisco.com>
Thu, 27 Aug 2015 17:34:36 +0000 (10:34 -0700)
committerTom Pantelis <tpanteli@brocade.com>
Thu, 27 Aug 2015 22:04:04 +0000 (22:04 +0000)
commit4f14faf543088e101a8b3d234a30f4d6b3d68d77
treea431a27faa76ee54f45bdac8596cf9de7e1d7415
parent27966a20f38fa6771b56936137a3a857474a91ef
BUG 4212 : Follower should not reschedule election timeout in certain cases.

Before:
Follower rescheduled election whenever it received any message

Now:
Followe reschedules election only if
    - The message received is a RaftRPC message
    - If the RaftRPC message is a RequestVote then only reschedule
      if vote is granted

Change-Id: Ia59c65e4896d72dfc49e86e59b6a9e9331a945ca
Signed-off-by: Moiz Raja <moraja@cisco.com>
(cherry picked from commit bf63fbc347b7cf055e22c3711f22af9d286c6281)
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractRaftActorBehavior.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Follower.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/FollowerTest.java