summaryrefslogtreecommitdiff
path: root/ovsdb/raft-private.c
diff options
context:
space:
mode:
authorHan Zhou <hzhou8@ebay.com>2019-08-19 09:29:59 -0700
committerBen Pfaff <blp@ovn.org>2019-08-21 11:30:07 -0700
commit923f01cad678228224ae4fe86466e2f61ab2c9d0 (patch)
treeb2fa82679cd8d695ac0bf3bb54cf75db84bc5c08 /ovsdb/raft-private.c
parent89771c1e65304b815ec01ec0f11affac01d62169 (diff)
downloadopenvswitch-923f01cad678228224ae4fe86466e2f61ab2c9d0.tar.gz
raft.c: Set candidate_retrying if no leader elected since last election.
candiate_retrying is used to determine if the current node is disconnected from the cluster when the node is in candiate role. However, a node can flap between candidate and follower role before a leader is elected when majority of the cluster is down, so is_connected() will flap, too, which confuses clients. This patch avoids the flapping with the help of a new member had_leader, so that if no leader was elected since last election, we know we are still retrying, and keep as disconnected from the cluster. Signed-off-by: Han Zhou <hzhou8@ebay.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovsdb/raft-private.c')
0 files changed, 0 insertions, 0 deletions