[ 
https://issues.apache.org/jira/browse/HDDS-12007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18046502#comment-18046502
 ] 

Ivan Andika edited comment on HDDS-12007 at 12/19/25 9:21 AM:
--------------------------------------------------------------

Additionally, if for example we don't use 
BlockDataStreamOutput#executePutBlockClose and it is the only place where we 
send writeAsync with 
StandardWriteOption.CLOSE, which triggers sendForward and eventually 
StateMachine#link.
 
Does this mean that ContainerStateMachine#link is never going to be called 
anymore? In this case, this means that Streaming Write Pipeline does not 
involve Raft at all? By this, I meant that user needs to send metadata 
separately (in this case PutBlock AsyncApi) requests to commit the write.


was (Author: JIRAUSER298977):
Additionally, if for example we don't use 
BlockDataStreamOutput#executePutBlockClose and it is the only place where we 
send writeAsync with 
StandardWriteOption.CLOSE, which triggers sendForward and eventually 
StateMachine#link.
 
Does this mean that ContainerStateMachine#link is never going to be called 
anymore? In this case, this means that Streaming Write Pipeline does not 
involve Raft at all? By this, I means that user needs to send metadata 
separately (in this case PutBlock AsyncApi) requests to commit the write.

> BlockDataStreamOutput should only send one PutBlock during close
> ----------------------------------------------------------------
>
>                 Key: HDDS-12007
>                 URL: https://issues.apache.org/jira/browse/HDDS-12007
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: Ozone Datanode
>            Reporter: Ivan Andika
>            Assignee: Tsz-wo Sze
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.0.0
>
>
> Currently, during close two PutBlock request will be sent
>  * executePutBlockClose: This uses the DataStreamOutput#writeAsync with 
> StandardWriteOption.CLOSE as part of the HDDS-6500 improvements
>  ** This will call sendForward which will trigger ContainerStateMachine#link 
> which will be processed like PutBlock
>  * putBlockAsync: This is a normal PutBlock request which is executed per 
> block boundary (similar to Write Pipeline V1)
> We should only call executePutBlockClose during close. We can use 
> ClientProtoUtils#getRaftClientReply to convert from DataStreamReply to 
> RaftClientReply which we can use to derive the PutBlock response.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to