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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to