Apache9 commented on code in PR #5350:
URL: https://github.com/apache/hbase/pull/5350#discussion_r1292898536


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServerResponseEncoder.java:
##########
@@ -55,4 +69,33 @@ public void write(ChannelHandlerContext ctx, Object msg, 
ChannelPromise promise)
       ctx.write(msg, promise);
     }
   }
+
+  private boolean handleFatalThreshold(ChannelHandlerContext ctx) {
+    int fatalThreshold = rpcServer.getWriteBufferFatalThreshold();
+    if (fatalThreshold <= 0) {
+      return false;
+    }
+
+    Channel channel = ctx.channel();
+    long outboundBytes = 
NettyUnsafeUtils.getTotalPendingOutboundBytes(channel);
+    if (outboundBytes < fatalThreshold) {
+      return false;
+    }
+
+    NettyServerRpcConnection conn = NettyServerRpcConnection.get(channel);

Review Comment:
   Let's refactor. Using different pattern for encoder and decoder will make 
others confusing...



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to