BUG-5626: handle ElectionTimeout message first 33/37033/7
authorRobert Varga <rovarga@cisco.com>
Sat, 2 Apr 2016 13:19:22 +0000 (15:19 +0200)
committerTony Tkacik <ttkacik@cisco.com>
Mon, 11 Apr 2016 14:15:16 +0000 (14:15 +0000)
commit630cb61cc1e51a486785162995eab7b541fcf237
tree70f7a1fe770e9d56f0f0a6a559190e6cd50adc9e
parent296b249e512b1c677ba5dbcb57d9d9404d8f0710
BUG-5626: handle ElectionTimeout message first

ElectionTimeout is a singleton, it is not a RaftRPC, hence its reception leads
to bail from handleMessage(). Move it to the front of the Candidate/Follower methods
so we can simplify the checks performed in those methods.

Change-Id: I3dfef4c42e2997d490de776de1c42e61cfacf217
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Candidate.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Follower.java