rickyma commented on code in PR #1455:
URL: 
https://github.com/apache/incubator-uniffle/pull/1455#discussion_r1453566074


##########
common/src/main/java/org/apache/uniffle/common/netty/TransportFrameDecoder.java:
##########
@@ -67,9 +67,17 @@ public void channelRead(ChannelHandlerContext ctx, Object 
data) {
       if (frame == null) {
         break;
       }
-      Message msg = Message.decode(curType, frame);
-      if (msg.body() == null) {
-        frame.release();
+      Message msg = null;
+      try {
+        msg = Message.decode(curType, frame);
+      } finally {
+        boolean shouldRelease =
+            msg != null

Review Comment:
   UTs added. @jerqi 
   Also, I have conveniently fixed an issue where a method parameter was 
missing. The `error` parameter was forgotten to be passed to the 
`UnsupportedOperationException`.
   
https://github.com/apache/incubator-uniffle/blob/master/common/src/main/java/org/apache/uniffle/common/netty/protocol/ResponseMessage.java#L32



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

Reply via email to