Github user lvfangmin commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/684#discussion_r238786172
  
    --- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/NIOServerCnxn.java 
---
    @@ -151,12 +148,17 @@ void sendBufferSync(ByteBuffer bb) {
          * sendBuffer pushes a byte buffer onto the outgoing buffer queue for
          * asynchronous writes.
          */
    -    public void sendBuffer(ByteBuffer bb) {
    +    public void sendBuffer(ByteBuffer... buffers) {
             if (LOG.isTraceEnabled()) {
                 LOG.trace("Add a buffer to outgoingBuffers, sk " + sk
                           + " is valid: " + sk.isValid());
             }
    -        outgoingBuffers.add(bb);
    +        synchronized (outgoingBuffers) {
    --- End diff --
    
    We have E2E perf regression detect for different use cases with different 
traffic, haven't seen any obvious perf impact there.


---

Reply via email to