bharatviswa504 commented on a change in pull request #923: HDDS-1654. Ensure 
container state on datanode gets synced to disk whennever state change happens.
URL: https://github.com/apache/hadoop/pull/923#discussion_r291679260
 
 

 ##########
 File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
 ##########
 @@ -249,6 +249,9 @@ public long takeSnapshot() throws IOException {
       LOG.info("Taking a snapshot to file {}", snapshotFile);
       try (FileOutputStream fos = new FileOutputStream(snapshotFile)) {
         persistContainerSet(fos);
+        fos.flush();
+        // make sure the snapshot file is synced
 
 Review comment:
   why do we need to make sure to flush to disk. 
   Asking this because in OM also we take a snapshot with lastappliedIndex 
value. So, trying to understand do we need to do it over there also.
    Want to understand why do we need to do this/ has this caused any issues?

----------------------------------------------------------------
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