[
https://issues.apache.org/jira/browse/HDDS-1654?focusedWorklogId=256079&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-256079
]
ASF GitHub Bot logged work on HDDS-1654:
----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Jun/19 17:11
Start Date: 07/Jun/19 17:11
Worklog Time Spent: 10m
Work Description: bharatviswa504 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_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]
Issue Time Tracking
-------------------
Worklog Id: (was: 256079)
Time Spent: 50m (was: 40m)
> 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
> Affects Versions: 0.5.0
> Reporter: Shashikant Banerjee
> Assignee: Shashikant Banerjee
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 0.5.0
>
> Time Spent: 50m
> 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: [email protected]
For additional commands, e-mail: [email protected]