[
https://issues.apache.org/jira/browse/HDFS-12980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16308858#comment-16308858
]
Anu Engineer edited comment on HDFS-12980 at 1/2/18 11:02 PM:
--------------------------------------------------------------
[~vagarychen] Thanks for the comment, The idea is that a container is deleted
only under 2 conditions. Either we failed to create it in a stipulated time (
that is we timeout), so we call for delete which allows us to cleanup if
needed, or a container is closed and then we can delete it.
One critical assumption in this state machine is that {{delete}} operation is
idempotent. So I can make a delete call on a container that does not exist, and
the system replies by saying " I can confirm that container does not exist
anymore". This is the property that is allowing us to delete when we encounter
failure.
This model allows us to delete a closed contianer, which was incidentally
missing from the earlier state machine.
was (Author: anu):
[~vagarychen] Thanks for the comment, The idea is that a container is deleted
only under 2 conditions. Either we failed to create it in a stipulated time (
that is we timeout), so we call for delete which allows us to cleanup if
needed, or a container is closed and then we can delete it.
One critical assumption in this state machine is that {{delete}} operation is
idempotent. So I can make a delete call on a container that does not exist, and
the system replies by saying " I can confirm that container does not exist
anymore". This is the property that is allowing us to delete when we encounter
failure.
> Ozone: SCM: Restructuring container state transition and events
> ---------------------------------------------------------------
>
> Key: HDFS-12980
> URL: https://issues.apache.org/jira/browse/HDFS-12980
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: ozone
> Reporter: Nanda kumar
> Assignee: Nanda kumar
> Attachments: HDFS-12980-HDFS-7240.000.patch
>
>
> Existing state transition of containers
> {noformat}
> ALLOCATED --------------> CREATING ------------------> OPEN
> -----------------> PENDING_CLOSE ----------> CLOSED
> (BEGIN_CREATE) | (COMPLETE_CREATE) |
> (FULL_CONTAINER) (CLOSE)
> | |
> | |
> | (TIMEOUT) | (DELETE)
> | |
> +---------> DELETING <------+
> |
> |
> | (CLEANUP)
> |
> DELETED
> {noformat}
> We don't have support for deleting a CLOSED container in this.
> *Proposal*
> {noformat}
>
> [ALLOCATED]------->[CREATING]--------->[OPEN]---------->[CLOSING]------->[CLOSED]
> (CREATE) | (CREATED) (FINALIZE) (CLOSE) |
> | |
> | |
> |(TIMEOUT) (DELETE)|
> | |
> +------------------> [DELETING] <-------------------+
> |
> |
> (CLEANUP)|
> |
> [DELETED]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]