[ https://issues.apache.org/jira/browse/ZOOKEEPER-1817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13827146#comment-13827146 ]
Raul Gutierrez Segales commented on ZOOKEEPER-1817: --------------------------------------------------- (as said before, i have only been testing the upstream version of this ticket) Some nits: {noformat} + if ((state == ServerState.LOOKING) || + (other.state == ServerState.LOOKING)) { + return (id == other.id && zxid == other.zxid && electionEpoch == other.electionEpoch && peerEpoch == other.peerEpoch); + } else { + if (version == other.version) { + return (id == other.id + && peerEpoch == other.peerEpoch); + } else { + return id == other.id; + } + } + } {noformat} could be simplified to: {noformat} + if ((state == ServerState.LOOKING) || + (other.state == ServerState.LOOKING)) { + return (id == other.id && zxid == other.zxid && electionEpoch == other.electionEpoch && peerEpoch == other.peerEpoch); + } else if (version == other.version) { + return id == other.id && peerEpoch == other.peerEpoch; + } + + return id == other.id; + } {noformat} In src/java/main/org/apache/zookeeper/server/quorum/flexible/QuorumMaj.java: {noformat} +//import org.apache.zookeeper.server.quorum.QuorumCnxManager; {noformat} just delete that line? In src/java/test/org/apache/zookeeper/server/quorum/FLEDontCareTest.java I guess testOutofElection is still work in progress because of the commented code? > Fix don't care for b3.4 > ----------------------- > > Key: ZOOKEEPER-1817 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1817 > Project: ZooKeeper > Issue Type: Sub-task > Reporter: Flavio Junqueira > Assignee: Flavio Junqueira > Priority: Blocker > Fix For: 3.4.6 > > Attachments: ZOOKEEPER-1817.patch, ZOOKEEPER-1817.patch, > ZOOKEEPER-1817.patch, ZOOKEEPER-1817.patch, ZOOKEEPER-1817.patch, > ZOOKEEPER-1817.patch, ZOOKEEPER-1817.patch, ZOOKEEPER-1817.patch, > logs.tar.gz, logs2.tar.gz > > > See umbrella jira. -- This message was sent by Atlassian JIRA (v6.1#6144)