[ 
https://issues.apache.org/jira/browse/HDDS-1981?focusedWorklogId=298623&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-298623
 ]

ASF GitHub Bot logged work on HDDS-1981:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Aug/19 11:55
            Start Date: 21/Aug/19 11:55
    Worklog Time Spent: 10m 
      Work Description: supratimdeka commented on pull request #1319: 
HDDS-1981: Datanode should sync db when container is moved to CLOSED or 
QUASI_CLOSED state
URL: https://github.com/apache/hadoop/pull/1319#discussion_r316138954
 
 

 ##########
 File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java
 ##########
 @@ -318,6 +326,8 @@ public void close() throws StorageContainerException {
     // It is ok if this operation takes a bit of time.
     // Close container is not expected to be instantaneous.
     compactDB();
+    // We must sync the DB after close operation
+    flushAndSyncDB();
 
 Review comment:
   updateContainerData takes care to revert the state of the container in case 
of failure.
   Won't that be a problem with flushDB? If flush fails, don't we want the 
container to remain Open?
   Also, related question : what should be the relative order - sync first and 
then change state to close, both with the writeLock held
   
   Same question applies to quasiClose as well.
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 298623)
    Time Spent: 50m  (was: 40m)

> Datanode should sync db when container is moved to CLOSED or QUASI_CLOSED 
> state
> -------------------------------------------------------------------------------
>
>                 Key: HDDS-1981
>                 URL: https://issues.apache.org/jira/browse/HDDS-1981
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone Datanode
>            Reporter: Lokesh Jain
>            Assignee: Lokesh Jain
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Datanode should sync db when container is moved to CLOSED or QUASI_CLOSED 
> state. This will ensure that the metadata is persisted.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

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

Reply via email to