You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Jing Zhao (JIRA)" <ji...@apache.org> on 2017/08/04 07:39:00 UTC

[jira] [Commented] (RATIS-97) Leader may not have majority after setConfiguration

    [ https://issues.apache.org/jira/browse/RATIS-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16114062#comment-16114062 ] 

Jing Zhao commented on RATIS-97:
--------------------------------

Thanks for the patch, Nicholas! Looks like we may have two scenarios here:
# There are old members already in the RaftGroup, and we're adding new members. For old members this whole change is actually a re-configuration call. The original leader will understand who are the members in the old/new configuration. For new members adding to the raft group, initially they only need to understand that they now should handle requests belonging to this new raft group (which means they are able to map incoming requests to the corresponding raft group based on the group id information). Then while the original leader trying to commit the conf(old, new) entry, these new members will have the chance to learn all the old/new members in this group. I.e., the knowledge about the old and new configuration should be learnt through the conf(old, new) log entry instead of passed from the {{reinitialize}} API.
# We're creating a brand new raft group. In this case we can pass in the initial raft configuration information through {{reinitialize}} (or a new {{attendGroup}} API in the future).

Therefore I think the {{reinitialize}} API should first take {{RaftGroupId}} as its input. Then for scenario #1, we do not need to pass the group member information in this API. For scenario #2, we pass in the initial members of the group. What do you think?

> Leader may not have majority after setConfiguration
> ---------------------------------------------------
>
>                 Key: RATIS-97
>                 URL: https://issues.apache.org/jira/browse/RATIS-97
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>         Attachments: r97_20170728.patch, r97_20170731.patch, r97_20170801b.patch, r97_20170801.patch
>
>
> Here is an example: Suppose a group has 3 servers and one of them is the leader.  Use setConfiguration to add 6 more servers.  The leader is still running as a leader although it does not has majority anymore.  The 6 new servers may elect a new leader among them.  Finally, there are two leaders in the group.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)