zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] normanmaurer commented on a change in pull request #753: ZOOKEEPER-3204: Reconfig tests are constantly failing on 3.5 after applying Java 11 fix
Date Wed, 06 Feb 2019 13:34:10 GMT
normanmaurer commented on a change in pull request #753: ZOOKEEPER-3204: Reconfig tests are
constantly failing on 3.5 after applying Java 11 fix
URL: https://github.com/apache/zookeeper/pull/753#discussion_r254248090
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxnSocketNetty.java
 ##########
 @@ -291,33 +355,36 @@ private void doWrite(List<Packet> pendingQueue, Packet p, ClientCnxn
cnxn) {
                         pendingQueue.add(p);
                     }
                 }
-                sendPkt(p);
+                sendPktOnly(p);
             }
             if (outgoingQueue.isEmpty()) {
                 break;
             }
             p = outgoingQueue.remove();
         }
+        // TODO: maybe we should flush in the loop above every N packets/bytes?
+        // But, how do we determine the right value for N ...
+        channel.flush();
 
 Review comment:
   That said the easiest way to optimise this somehow is to add the `FlushConsolidationHandler`
to the pipeline. It should be placed before your client / server handler:
   
   https://github.com/netty/netty/blob/netty-4.1.33.Final/handler/src/main/java/io/netty/handler/flush/FlushConsolidationHandler.java

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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