Do not bump follower term while it is isolated 81/89881/2
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 11:58:17 +0000 (11:58 +0000)
commited30c03e99f314f7e34e7061ba214f072493bf3f
tree849eb5452693e7b3c08ab34b77b4a39db7343008
parent4348423d329a5e23ad3c60ad5ff894f334e33b98
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