Do not bump follower term while it is isolated 82/89882/1
authorTomas Cere <tomas.cere@pantheon.tech>
Fri, 22 May 2020 11:11:04 +0000 (13:11 +0200)
committerRobert Varga <nite@hq.sk>
Mon, 25 May 2020 09:21:07 +0000 (09:21 +0000)
commit35f4829f855f44d67315672c3713456d003511a6
tree3da03231a6f3ece9f0f0f0fdb9feedc58d4db703
parent4f0fc3a7887968d2a949f616c59ea59cb92dc2d0
Do not bump follower term while it is isolated

When a follower gets into a state that its isolated(ie cannot reach either peer)
it starts bumping its term every election timeout. Once the cluster heals it
would then disrupt the cluster because it has a higher term then the healthy part.
We can avoid this by not triggering new elections on followers that cannot
reach other peers while they are unreachable.

JIRA: CONTROLLER-1935
Change-Id: I8ee9f333740637ba5569287d405540f374bbc4bc
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
(cherry picked from commit d3d04140ac3d7a2a90a3b953cc4ea27fca2bfc32)
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Follower.java