You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Glen Geng (Jira)" <ji...@apache.org> on 2020/07/21 09:17:00 UTC

[jira] [Updated] (RATIS-1008) Heartbeats under grpc bi-direction stream does not work as expected.

     [ https://issues.apache.org/jira/browse/RATIS-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Glen Geng updated RATIS-1008:
-----------------------------
    Issue Type: Bug  (was: Improvement)

> Heartbeats under grpc bi-direction stream does not work as expected.
> --------------------------------------------------------------------
>
>                 Key: RATIS-1008
>                 URL: https://issues.apache.org/jira/browse/RATIS-1008
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: Glen Geng
>            Assignee: Glen Geng
>            Priority: Major
>
> We should make sure that the stale leader steps down to the candidate state before the next leader election.
> Proposal:
> In the heartbeat thread in the Leader node, we should check if the last response time of the follower is less than the leader election timeout. If the majority of the follower’s last response time is less than the leader election timeout, the current leader is still the active leader. Majority of the followers are heartbeating to the current leader, so there can’t be a new leader.
> If the majority of follower’s last response time is greater than the leader election timeout, the current leader should step down and become a candidate.
> With this check, we can be sure that the current leader will step down and become a candidate before the new leader election starts in case of a network partition.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)