jvrao commented on a change in pull request #1088: ISSUE #1086 (@bug 
W-4146427@) Client-side backpressure in netty (Fixes: 
io.netty.util.internal.OutOfDirectMemoryError under continuous heavy load)
URL: https://github.com/apache/bookkeeper/pull/1088#discussion_r168384166
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieClient.java
 ##########
 @@ -150,6 +150,16 @@ private int getRc(int rc) {
         return faultyBookies;
     }
 
+    public boolean isWritable(BookieSocketAddress address) {
+        final PerChannelBookieClientPool pcbcPool = lookupClient(address);
+        if (pcbcPool == null) {
+            // let write fail with whatever error it produces
+            return true;
+        }
+
+        return pcbcPool.isWritable(0L /*not really used in obtain()*/);
 
 Review comment:
   If we have multiple channels in the pool you are checking only one here 
isn't it?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to