jhuan31 commented on a change in pull request #1116: ZOOKEEPER-3575: Moving
sending packets in Learner to a separate thread
URL: https://github.com/apache/zookeeper/pull/1116#discussion_r356944566
##########
File path:
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java
##########
@@ -149,6 +159,14 @@ void validateSession(ServerCnxn cnxn, long clientId, int
timeout) throws IOExcep
* @throws IOException
*/
void writePacket(QuorumPacket pp, boolean flush) throws IOException {
+ if (asyncSending) {
+ sender.queuePacket(pp);
Review comment:
If packet are sent asynchronously, flush is no use. If async sending is
turned off, then flush is passed on to writePacketNow() and will cause the
output buffer flushed.
----------------------------------------------------------------
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