szetszwo commented on code in PR #5252:
URL: https://github.com/apache/hadoop/pull/5252#discussion_r1089669125
##########
hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcUtil.java:
##########
@@ -170,15 +172,18 @@ public void channelRead(ChannelHandlerContext ctx, Object
msg)
*/
@ChannelHandler.Sharable
private static final class RpcUdpResponseStage extends
- ChannelInboundHandlerAdapter {
+ SimpleChannelInboundHandler<RpcResponse> {
+ public RpcUdpResponseStage() {
+ // do not auto release the RpcResponse message.
Review Comment:
Should we release `response` in `channelRead0`?
```java
ctx.writeAndFlush(new DatagramPacket(buf,
(InetSocketAddress) response.recipient()))
.addListener(future -> response.release());
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]