zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Germán Blanco (JIRA) <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-1805) "Don't care" value in ZooKeeper election breaks rolling upgrades
Date Mon, 04 Nov 2013 09:22:19 GMT

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

Germán Blanco commented on ZOOKEEPER-1805:
------------------------------------------

Thank you for considering my comments. Here are a few more ...
Personally, I would check that both Votes are out of the election before ignoring the fields
in Vote.java. And I believe peerEpoch should be taken into account for normal votes:
{noformat}
>> +        if ((state != ServerState.LOOKING) && (other.state != ServerState.LOOKING))
{^M
 +           return (id == other.id);^M
 +        } else {^M
 +           return (id == other.id^M
 +                   && (zxid == other.zxid) ^M
 +                   && (electionEpoch == other.electionEpoch)
>> +               && (peerEpoch == other.peerEpoch));^M
 +        }^M
{noformat}
I think that the previous test case (testJoinInconsistentEnsemble in FLETest.java) would look
better if we now change also the peerEpoch:
{noformat}
 +        Vote newVote = new Vote(leaderSid, zxid+100, electionEpoch+100, peerEpoch+100, state);
{noformat}
In this way, this test case also verifies the new changes.
As indicated before, I would also remove the method updateElectionVote in QuorumPeer.java
and the line under the comment for ZOOKEEPER-1732 in Leader.java and Learner.java. The value
of peerEpoch will be ignored, so updating it looks like a waste of time to me.

> "Don't care" value in ZooKeeper election breaks rolling upgrades
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1805
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1805
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Flavio Junqueira
>            Assignee: Flavio Junqueira
>            Priority: Blocker
>             Fix For: 3.4.6, 3.5.0
>
>         Attachments: ZOOKEEPER-1805-b3.4.patch, ZOOKEEPER-1805.patch, ZOOKEEPER-1805.patch,
ZOOKEEPER-1805.patch, ZOOKEEPER-1805.patch, ZOOKEEPER-1805.patch, ZOOKEEPER-1805.patch, ZOOKEEPER-1805.patch,
ZOOKEEPER-1805.patch, ZOOKEEPER-1805.patch, ZOOKEEPER-1805.patch
>
>
> This is an issue that has been originally reported in ZOOKEEPER-1732.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message