breed commented on code in PR #1925: URL: https://github.com/apache/zookeeper/pull/1925#discussion_r996631742
########## zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java: ########## @@ -756,13 +760,21 @@ protected void syncWithLeader(long newLeaderZxid) throws Exception { zk.startupWithoutServing(); if (zk instanceof FollowerZooKeeperServer) { FollowerZooKeeperServer fzk = (FollowerZooKeeperServer) zk; - for (PacketInFlight p : packetsNotCommitted) { + fzk.syncProcessor.setDelayForwarding(true); + for (PacketInFlight p : packetsNotLogged) { fzk.logRequest(p.hdr, p.rec, p.digest); } - packetsNotCommitted.clear(); + packetsNotLogged.clear(); Review Comment: is this one of the key bugs? did we need to keep packetsNotCommitted around? ########## zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java: ########## @@ -792,7 +804,7 @@ protected void syncWithLeader(long newLeaderZxid) throws Exception { // Similar to follower, we need to log requests between the snapshot // and UPTODATE ObserverZooKeeperServer ozk = (ObserverZooKeeperServer) zk; - for (PacketInFlight p : packetsNotCommitted) { + for (PacketInFlight p : packetsNotLogged) { Review Comment: it's not completely obvious which list to use here. i think a good comment on the semantics of the two lists is key. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org