You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Andy Wu (JIRA)" <ji...@apache.org> on 2018/05/18 23:24:00 UTC

[jira] [Created] (RATIS-242) Leader Election not working properly

Andy Wu created RATIS-242:
-----------------------------

             Summary: Leader Election not working properly
                 Key: RATIS-242
                 URL: https://issues.apache.org/jira/browse/RATIS-242
             Project: Ratis
          Issue Type: Bug
    Affects Versions: 0.2.0-alpha
            Reporter: Andy Wu
             Fix For: 0.2.0-alpha


How to produce:
1. Assume we have three servers: s0, s1 and s2. We start s0 and s2, and let us randomly pick up a leader, say s0. Assume after leader election, s0 and s2 are in term k.
2. Let us start server s1, assume s1 did not received a heartbeat for a while, and it becomes candidate. It proposes a leader election at term 1 since it has not received any heartbeat yet.
3. Assume s0 or s2 received the vote request, and RaftServerImpl#requestVote will withholdVotes, so server s0 or s2 will reject the vote request from s1.
4. In LeaderElection#waitForResults, s1 will be rejected with a new term. It will change its state as follower with a new term. Somehow server s1 does not receive any heartbeat update from leader s0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)