bbeaudreault commented on code in PR #5350:
URL: https://github.com/apache/hbase/pull/5350#discussion_r1292856038
##########
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:
The decoder is created after the NettyServerRpcConnection is constructed.
The encoder unfortunately is created in NettyRpcServer when the channel is
first initialized, before the NettyServerRpcConnection is constructed. Maybe
we can refactor a bit?
--
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]