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

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

                Author: ASF GitHub Bot
            Created on: 10/Jul/19 04:08
            Start Date: 10/Jul/19 04:08
    Worklog Time Spent: 10m 
      Work Description: bshashikant commented on 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_r301879028
 
 

 ##########
 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:
   We need to persist the state on disk to ensure we don't read an incorrect 
replica state on restart. We have come across an issue where, unhealthy state 
of a replica was not persisted on disk and on restart , it was detected as an 
open replica which may end up taking more IO on restart causing inconsistencies.
 
----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 274627)
    Time Spent: 1h  (was: 50m)

> Ensure container state on datanode gets synced to disk whenever state change 
> happens
> ------------------------------------------------------------------------------------
>
>                 Key: HDDS-1654
>                 URL: https://issues.apache.org/jira/browse/HDDS-1654
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone Datanode
>            Reporter: Shashikant Banerjee
>            Assignee: Shashikant Banerjee
>            Priority: Blocker
>              Labels: pull-request-available
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Currently, whenever there is a container state change, it updates the 
> container but doesn't sync.
> The idea is here to is to force sync the state to disk everytime there is a 
> state change.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to