zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] lvfangmin commented on a change in pull request #1047: [ZOOKEEPER-3500] Improving the ZAB UPTODATE semantic to only issue it to learner when there is limited lagging
Date Mon, 19 Aug 2019 17:28:14 GMT
lvfangmin commented on a change in pull request #1047: [ZOOKEEPER-3500] Improving the ZAB UPTODATE
semantic to only issue it to learner when there is limited lagging
URL: https://github.com/apache/zookeeper/pull/1047#discussion_r315325246
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LearnerHandler.java
 ##########
 @@ -615,21 +632,30 @@ public void run() {
             syncThrottler.endSync();
             syncThrottler = null;
 
-            // now that the ack has been processed expect the syncLimit
-            sock.setSoTimeout(learnerMaster.syncTimeout());
-
             /*
              * Wait until learnerMaster starts up
              */
             learnerMaster.waitForStartup();
 
+            int queueSize = queuedPackets.size();
+            while (upToDatePacketsLimit > 0 && queueSize > upToDatePacketsLimit)
{
+                LOG.info("Waiting for learner queue to be drained before " +
+                        "sending UPTODATE to {}, current queue size: {}",
+                        sid, queueSize);
+                Thread.sleep(100);
 
 Review comment:
   Waiting the queue being drained before sent UPTODATE can help avoid leader timedout when
wait on learner's UPDATETO ack due to too many txns queued on leader between NEWLEADER and
UPTODATE and need to be replayed on learner.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message