zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shralex <...@git.apache.org>
Subject [GitHub] zookeeper pull request #438: ZOOKEEPER-2959: ignore accepted epoch and LEADE...
Date Thu, 05 Apr 2018 06:48:36 GMT
Github user shralex commented on a diff in the pull request:

    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/Leader.java ---
    @@ -1183,8 +1183,10 @@ public long getEpochToPropose(long sid, long lastAcceptedEpoch)
throws Interrupt
                 if (lastAcceptedEpoch >= epoch) {
                     epoch = lastAcceptedEpoch+1;
    -            connectingFollowers.add(sid);
                 QuorumVerifier verifier = self.getQuorumVerifier();
    +            if(verifier.getVotingMembers().containsKey(sid)) {
    --- End diff --
    If I recall correctly, the reason this wasn't done are concerns around the impact on performance
- containsQuorum is called every time an ACK is received for every operation proposal. So
if you need 3 asks to commit an operation, we'll be doing these checks (figuring out who's
a participant and who's not} for {ACK1}, for {ACK1, ACK2} and for {ACK1, ACK2, ACK3}. This
compared to comparing two ints as it stands now. So this is why it wasn't done...


View raw message