hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anu Engineer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-12980) Ozone: SCM: Restructuring container state transition and events
Date Tue, 02 Jan 2018 23:56:00 GMT

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

Anu Engineer commented on HDFS-12980:
-------------------------------------

[~vagarychen] Thanks for the comments. 
bq. why we don't allow a DELETE on a container that is already created, and is in OPEN state?

I think it boils down to abstractions that we want to support. When we delete a container,
this state machine is saying we are either working against a closed the container or container
creation failed. Those are the only 2 states under which a container can be deleted, Both
these states share the property that mutations are not allowed in the container.

If we say you can delete an open container, then we have to tackle a more complex set of questions
like, what if someone else is writing to this open container? Those issues are solved in the
*Open -> Closing ->Closed* transition, so in practice, we need to make sure that all
writes are done or I/O must fail before we can delete a container. It is much simpler to support
delete only on closed containers. In other words, we offer a model which says "If you want
to delete an open container, please close the container and delete".  The assumption here
is that it is simpler to reason about. Is there any scenario that we need to support the delete
while a container is open or when the container is in the closing state?  If we have a valid
state that needs that kind of a support, by all means, we can add it. Right now, it is more
of a simplification of the state machine and makes it easy to reason about the state machine.

> 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: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message