jonmv commented on code in PR #1925:
URL: https://github.com/apache/zookeeper/pull/1925#discussion_r993854819


##########
zookeeper-server/src/main/java/org/apache/zookeeper/server/SyncRequestProcessor.java:
##########
@@ -55,6 +56,55 @@ public class SyncRequestProcessor extends 
ZooKeeperCriticalThread implements Req
 
     private static final Request REQUEST_OF_DEATH = Request.requestOfDeath;
 
+    private static class FlushRequest extends Request {
+        private final CountDownLatch latch = new CountDownLatch(1);
+        public FlushRequest() {
+            super(null, 0, 0, 0, null, null);
+        }
+    }
+
+    private static final Request turnForwardingDelayOn = new Request(null, 0, 
0, 0, null, null);
+    private static final Request turnForwardingDelayOff = new Request(null, 0, 
0, 0, null, null);
+
+    private static class DelayingProcessor implements RequestProcessor, 
Flushable {

Review Comment:
   Doesn't _need_ to, but I found the `SyncRequestProcessor` to be complicated 
enough already, and this was a separate set of concerns, so I felt it was 
cleaner to put it in a separate processor. 



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