You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by lvfangmin <gi...@git.apache.org> on 2018/12/04 18:57:23 UTC

[GitHub] zookeeper pull request #684: ZOOKEEPER-3180: Add response cache to improve t...

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.


---