lvfangmin commented on a change in pull request #851: ZOOKEEPER-3311: Allow a 
delay to the transaction log flush
URL: https://github.com/apache/zookeeper/pull/851#discussion_r265848779
 
 

 ##########
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/SyncRequestProcessor.java
 ##########
 @@ -95,6 +98,28 @@ public static int getSnapCount() {
         return snapCount;
     }
 
+    private long getRemainingDelay() {
+        long flushDelay = zks.getFlushDelay();
+        long duration = Time.currentElapsedTime() - lastFlushTime;
+        if (duration < flushDelay) {
+            return flushDelay - duration;
+        }
+        return 0;
+    }
+
+    /* If both flushDelay and maxMaxBatchSize are set (> 0), flush
 
 Review comment:
   nit: /* -> /**

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to