Bug 8606: Continue leadership transfer on pauseLeader timeout 40/58740/2
authorTom Pantelis <tompantelis@gmail.com>
Mon, 12 Jun 2017 13:42:38 +0000 (09:42 -0400)
committerRobert Varga <nite@hq.sk>
Tue, 13 Jun 2017 09:24:13 +0000 (09:24 +0000)
commitdac16f0d464eff3325b3800a803e81b303964e4b
tree77ae4565d391c0728dd5d8dad40df5ba9c49f145
parent9dd99568ffecade36887a5d4266e4acfe8c70ff4
Bug 8606: Continue leadership transfer on pauseLeader timeout

Modified it to continue with leadership transfer if pauseLeader times out
instead of aborting. The shard may have a lot of transactions queued up
which it can't finish in time but there may still be a follower that is
caught up (ie whose matchIndex equals the leader's lastIndex) or would be
caught up if leadership transfer continued. Worst case is no follower is
available and the "catch up" phase of leadership transfer also times out
which would lengthen shut down time but that should be fine.

Change-Id: I1ec1ef43bb556e50416bb7239ce3c267265db9b3
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorLeadershipTransferCohort.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorLeadershipTransferCohortTest.java