smengcl commented on PR #6777:
URL: https://github.com/apache/ozone/pull/6777#issuecomment-2159504877

   > Just want to put down what was discussed offline.
   > 
   > The logic of `hsync()` consists of the following.
   > 
   > 1. Update the current buffer and internal counters in the OutputStream 
states.
   > 2. Use the current buffer and internal counters to compose a `writeChunk` 
request.
   > 3. Send the `writeChunk` request.
   > 4. Wait the `writeChunk` response and send a putBlock request.
   > 5. Wait for `putBlock` reply and issue a watchForCommmit.
   > 6. Wait for `watchForCommit` response and release retries buffers 
accordingly (in CommitWatcher).
   
   Thanks @duongkame the comment. Overall I agree with your idea.
   
   Commenting on some details:
   
   1. In step 4, if I understand correctly with the current master branch impl, 
the writeChunk response is NOT actually waited on before sending out the 
putBlock request. BOS#writeChunkToContainer() returns a future but the caller 
BOS#writeChunk() doesn't even care.
   2. In step 5, watchForCommit itself waits for all pending unacknowledged 
putBlock requests to finish, not before.
   
   Effectively it is already sending writeChunk and putBlock in parallel, so we 
can further improve the parallelism.


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