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/22 21:48:00 UTC
[jira] [Commented] (RATIS-242) Leader Election not working properly
[ https://issues.apache.org/jira/browse/RATIS-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16484635#comment-16484635 ]
Andy Wu commented on RATIS-242:
-------------------------------
RATIS-239 should fix it.
> 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
> Priority: Major
> 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 k. Somehow server s1 does not receive any heartbeat update from leader s0, and it will keep retrying leader election again and again.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)