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/pull/1455/files#diff-312deeac76db5d5c48ab0caf09429615f3719eadc5ef7fbd8936d31b0d8049d3R32
--
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]