You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/04/04 23:45:41 UTC

[jira] [Commented] (ZOOKEEPER-2746) Leader hand off during dynamic reconfig is a best effort, not a guarantee, when none trivial changes happen on current leader.

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

ASF GitHub Bot commented on ZOOKEEPER-2746:
-------------------------------------------

GitHub user hanm opened a pull request:

    https://github.com/apache/zookeeper/pull/213

    ZOOKEEPER-2746: remove the check on the new leader after a dynamic re…

    …config operation.
    
    This check might not always hold because the nominated leader could fail to lead the quorum during sync phase - for example if sync time out [when waiting for quorum ack](https://github.com/apache/zookeeper/blob/master/src/java/main/org/apache/zookeeper/server/quorum/Leader.java#L1232). I am thinking we should just remove this instead of fixing it because the nominated leader is not an interface level contract / guarantee but a best effort / implementation level details.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/hanm/zookeeper ZOOKEEPER-2746

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/213.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #213
    
----
commit 9e367d6f46811233b4bac169f5abb58ff1777273
Author: Michael Han <ha...@apache.org>
Date:   2017-04-04T23:41:09Z

    ZOOKEEPER-2746: remove the check on the new leader after a dynamic reconfig operation.

----


> Leader hand off during dynamic reconfig is a best effort, not a guarantee, when none trivial changes happen on current leader.
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2746
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2746
>             Project: ZooKeeper
>          Issue Type: Test
>    Affects Versions: 3.5.2
>            Reporter: Michael Han
>            Assignee: Michael Han
>
> When none trivial config change happens on the leader (e.g. port change, role change) to minimize disruption of quorum we do leader hand off by having the current leader nominate the next leader instead of kicking off a full leader election.
> However this is a best effort and not a guarantee that the new leader of the quorum will be the nominated leader: it is possible that the nominated leader fail to establish the leadership during sync phase, which leads to new election rounds and a different leader elected. 
> In ReconfigTest.testPortChange one check is the new leader after dynamic reconfig of the current leader has to be a different leader; based on what described earlier this is not always the case as the nominated leader might fail to get a quorum to ack its leadership during sync phase. We could either fixed the test by removing the check, or always guarantee that the new leader after dynamic reconfig is the nominated leader (which does not make much sense given the nominated leader also has a possibility to crash.).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)