Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-2746

Leader hand-off during dynamic reconfig is best effort, while test always expects it

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.5.2
    • 3.5.4, 3.6.0
    • None
    • None

    Description

      When non-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, and the old leader might end up as the new leader. 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.).

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hanm Michael Han
            hanm Michael Han
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment