szetszwo commented on a change in pull request #3195:
URL: https://github.com/apache/ozone/pull/3195#discussion_r827701216



##########
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:
       Writing an empty buffer may not work as expected.  In the streaming 
model, data is continuous but not block-by-block.  Both sender and receiver 
must consider that the data is a stream of bytes.
   
   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.  




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