jerqi commented on code in PR #1313:
URL: 
https://github.com/apache/incubator-uniffle/pull/1313#discussion_r1393689178


##########
client/src/main/java/org/apache/uniffle/client/impl/ShuffleReadClientImpl.java:
##########
@@ -258,7 +262,10 @@ protected Roaring64NavigableMap getProcessedBlockIds() {
 
   private int read() {
     long start = System.currentTimeMillis();
-    ShuffleDataResult sdr = clientReadHandler.readShuffleData();
+    if (sdr != null) {

Review Comment:
   Why do we need this? We have released the memory in the upper level.



##########
common/src/test/java/org/apache/uniffle/common/netty/protocol/NettyProtocolTest.java:
##########
@@ -177,15 +177,16 @@ public void testGetLocalShuffleDataResponse() {
     ByteBuf byteBuf = Unpooled.buffer(encodeLength, encodeLength);
     getLocalShuffleDataResponse.encode(byteBuf);
     GetLocalShuffleDataResponse getLocalShuffleDataResponse1 =
-        GetLocalShuffleDataResponse.decode(byteBuf);
+        GetLocalShuffleDataResponse.decode(byteBuf, true);
 
     assertEquals(
         getLocalShuffleDataResponse.getRequestId(), 
getLocalShuffleDataResponse1.getRequestId());
     assertEquals(
         getLocalShuffleDataResponse.getRetMessage(), 
getLocalShuffleDataResponse1.getRetMessage());
     assertEquals(
         getLocalShuffleDataResponse.getStatusCode(), 
getLocalShuffleDataResponse1.getStatusCode());
-    assertEquals(getLocalShuffleDataResponse.getData(), 
getLocalShuffleDataResponse1.getData());
+    //    assertEquals(getLocalShuffleDataResponse.body().byteBuf(),

Review Comment:
   Why do we need this comment?



##########
common/src/main/java/org/apache/uniffle/common/netty/TransportFrameDecoder.java:
##########
@@ -66,10 +67,10 @@ public void channelRead(ChannelHandlerContext ctx, Object 
data) {
       if (frame == null) {
         break;
       }
-      // todo: An exception may be thrown during the decoding process, causing 
frame.release() to
-      // fail to be called
       Message msg = Message.decode(curType, frame);
-      frame.release();
+      if (msg.body() == null) {

Review Comment:
   Why do we need this condition?



##########
common/src/test/java/org/apache/uniffle/common/netty/protocol/NettyProtocolTest.java:
##########
@@ -234,11 +235,9 @@ public void testGetLocalShuffleIndexResponse() {
     assertEquals(
         getLocalShuffleIndexResponse.getRetMessage(),
         getLocalShuffleIndexResponse1.getRetMessage());
-    assertEquals(
-        getLocalShuffleIndexResponse.getFileLength(),
-        getLocalShuffleIndexResponse1.getFileLength());
-    assertEquals(
-        getLocalShuffleIndexResponse.getIndexData(), 
getLocalShuffleIndexResponse1.getIndexData());
+    //    assertEquals(

Review Comment:
   Why do we need this comment?



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