[
https://issues.apache.org/jira/browse/ZOOKEEPER-1732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13781639#comment-13781639
]
Germán Blanco commented on ZOOKEEPER-1732:
------------------------------------------
Thanks a lot for taking a look at this, and for your comments.
1 - I guess you mean the "if (n.leader != self.getId())" check in
FastLeaderElection.java. I will remove that.
2 - This is because the final election vote in the leader will have "newEpoch -
1". The winning vote will contain the epoch of the leader, but once the
election finishes, the leader increments the epoch. So actually "newEpoch" is
the epoch that won the election plus one. And the vote reported in the Fast
Leader Election is the vote that won the election. If we set the vote to just
"newEpoch", then we need to update the vote also in the Leader, and not only on
Learners as it is currently done. At least that is how I think it works.
3 - I will fix identation and add the comment. The identation is funny around
those lines though.
4 - I will change the name and change to protected.
5 - Also will do.
Patches will be uploaded in some minutes.
> ZooKeeper server unable to join established ensemble
> ----------------------------------------------------
>
> Key: ZOOKEEPER-1732
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1732
> Project: ZooKeeper
> Issue Type: Bug
> Components: leaderElection
> Affects Versions: 3.4.5
> Environment: Windows 7, Java 1.7
> Reporter: Germán Blanco
> Assignee: Germán Blanco
> Priority: Blocker
> Fix For: 3.5.0, 3.4.6
>
> Attachments: CREATE_INCONSISTENCIES_patch.txt, zklog.tar.gz,
> ZOOKEEPER-1732-3.4.patch, ZOOKEEPER-1732.patch
>
>
> I have a test in which I do a rolling restart of three ZooKeeper servers and
> it was failing from time to time.
> I ran the tests in a loop until the failure came out and it seems that at
> some point one of the servers is unable to join the enssemble formed by the
> other two.
--
This message was sent by Atlassian JIRA
(v6.1#6144)