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

Nanda kumar commented on HDDS-801:
----------------------------------

Thanks [~msingh], [~shashikant] for the review.

bq. contaienrState to containerState
Fixed.
bq. updateContainerState should be changed to appropriate type like closing or 
stopContainer
Fixed.
bq. I feel this can be moved inside XceiverServerRatis
Done
bq. lets add a getter function
Added
bq. Should this be encapsulated in one function
Introduced {{closeInternal}} private method, both close and quasi close uses it 
now.
bq. When the transition from QUASI_CLOSED to CLOSED is allowed later, we should 
not compact the DB again.
It makes the code simple, it shouldn't be a problem even if we compact the db 
multiple times.
bq. the container should already be in CLOSING state, Lets add an precondition 
here that the container is already in closing state.
There are cases where {{handleCloseContainer}} is called even when the 
container is still in OPEN state (close container called via client API), some 
of which [~shashikant] has mentioned. So we move it to CLOSING state here if 
the container is not already in CLOSING state.
bq. lets change the assertion here to isQuasiClosed.
Fixed

bq. update the comment to be container getting "quasi closed" rather than 
getting closed.
Done
bq. closeContainer is exposed to clients in ContainerProtocolCalls.Java
To handle this case, if the container is in OPEN state we move it to CLOSING in 
{{KeyValueHandler#handleCloseContainer}}.
bq. Any state change in ContainerState should triggerICR
The ICR is triggered inside closeContainer/quasiCloseContainer call itself. No 
need to call updateContainerState internally.
bq. There can be a case where let's say the SCM gets network separated from a 
follower before sending...
This call will come through {{KeyValueHandler#handleCloseContainer}}, we will 
move the container to CLOSING state here if it's not there already.
bq. The comments look misleading here.
The TODO is for performance optimization which can be done later. The comment 
says that "Close container is not expected to be instantaneous" (current 
implementation). It looks fine to me.



> Quasi close the container when close is not executed via Ratis
> --------------------------------------------------------------
>
>                 Key: HDDS-801
>                 URL: https://issues.apache.org/jira/browse/HDDS-801
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>          Components: Ozone Datanode
>    Affects Versions: 0.3.0
>            Reporter: Nanda kumar
>            Assignee: Nanda kumar
>            Priority: Major
>         Attachments: HDDS-801.000.patch, HDDS-801.001.patch, 
> HDDS-801.002.patch, HDDS-801.003.patch
>
>
> When datanode received CloseContainerCommand and the replication type is not 
> RATIS, we should QUASI close the container. After quasi-closing the container 
> an ICR has to be sent to SCM.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to