akpatnam25 commented on code in PR #3630:
URL: https://github.com/apache/celeborn/pull/3630#discussion_r2957764786


##########
common/src/main/java/org/apache/celeborn/common/network/protocol/EncryptedMessageWithHeader.java:
##########
@@ -82,7 +84,12 @@ public ByteBuf readChunk(ByteBufAllocator allocator) throws 
Exception {
       return null;
     }
 
-    if (totalBytesTransferred < headerLength) {
+    if (body instanceof ByteBuf) {

Review Comment:
   yes, we can do this: 
   ```
      if (body instanceof ByteBuf) {
         // For ByteBuf bodies, return header + body as a single composite 
buffer.
         ByteBuf bodyBuf = (ByteBuf) body;
         totalBytesTransferred = headerLength + bodyLength;
         return Unpooled.wrappedBuffer(header.retain(), bodyBuf.retain());
       } else {
           // original logical
       }
   ```



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

Reply via email to