guohao-rosicky commented on a change in pull request #3195:
URL: https://github.com/apache/ozone/pull/3195#discussion_r834010609



##########
File path: 
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockDataStreamOutput.java
##########
@@ -438,12 +439,39 @@ private void executePutBlock(boolean close,
       byteBufferList = null;
     }
     waitFuturesComplete();
+    BlockData blockData = containerBlockData.build();
     if (close) {
-      dataStreamCloseReply = out.closeAsync();
+      out.writeAsync(ByteBuffer.allocateDirect(0).asReadOnlyBuffer())

Review comment:
       > 
   
   Hi, @szetszwo 
   I have a question, about 
   ```
   For example, the sender may write 3 times with lengths 3, 4, 5. Since there 
could be buffers/encoder/decoder in between, the receiver may receive a single 
buffer with length 12.
   ```
   I noticed that in HDFS, marking the end of stream is also represented by an 
empty package.
   In Ratis Stream, sticky packets have already been dealt with.
   
   org.apache.ratis.netty.NettyDataStreamUtils#encodeDataStreamRequestHeader
   
https://github.com/apache/ratis/blob/master/ratis-netty/src/main/java/org/apache/ratis/netty/NettyDataStreamUtils.java#L90
   




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