You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by shralex <gi...@git.apache.org> on 2018/04/05 06:48:36 UTC
[GitHub] zookeeper pull request #438: ZOOKEEPER-2959: ignore accepted epoch and LEADE...
Github user shralex commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/438#discussion_r179363930
--- 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...
---