You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/08/21 11:55:31 UTC

[GitHub] [hadoop] supratimdeka commented on a change in pull request #1319: HDDS-1981: Datanode should sync db when container is moved to CLOSED or QUASI_CLOSED state

supratimdeka commented on a change in 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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org