diff options
author | Han Zhou <hzhou8@ebay.com> | 2019-08-19 09:29:59 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-08-21 11:30:07 -0700 |
commit | 923f01cad678228224ae4fe86466e2f61ab2c9d0 (patch) | |
tree | b2fa82679cd8d695ac0bf3bb54cf75db84bc5c08 /ovsdb/raft-private.c | |
parent | 89771c1e65304b815ec01ec0f11affac01d62169 (diff) | |
download | openvswitch-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