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/06/07 17:11:09 UTC

[GitHub] [hadoop] bharatviswa504 commented on a change in pull request #923: HDDS-1654. Ensure container state on datanode gets synced to disk whennever state change happens.

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