kezhuw commented on code in PR #2152:
URL: https://github.com/apache/zookeeper/pull/2152#discussion_r1766202590


##########
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java:
##########
@@ -784,7 +807,9 @@ protected void syncWithLeader(long newLeaderZxid) throws 
Exception {
         }
         ack.setZxid(ZxidUtils.makeZxid(newEpoch, 0));
         writePacket(ack, true);
-        zk.startServing();
+        sock.setSoTimeout(self.tickTime * self.syncLimit);
+        self.setSyncMode(QuorumPeer.SyncMode.NONE);

Review Comment:
   @AlphaCanisMajoris Shall we move this to right after 
`self.setCurrentEpoch(newEpoch)` ? I think `self.setCurrentEpoch(newEpoch)` is 
the signal that we are synced with new epoch leader and all left was waiting 
`UPTODATE` to open the gate. Given that `self.getSyncMode()` was used to 
determine whether to fully shutdown (a.k.a. clear memory database tree). I 
think we could promote this a bit earlier.



-- 
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

Reply via email to