[
https://issues.apache.org/jira/browse/HDDS-1843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16892429#comment-16892429
]
Shashikant Banerjee commented on HDDS-1843:
-------------------------------------------
The solution to address the problem here is as follows:
Every times a ratis snapshot is taken, "takeSnapshot" inside the
containerStateMachine should stamp the BCSID of each container in the
pipeline(It already stamps the conatinerID presently) and sync the
snapshotFile. Everytime a datanode restart happens, the containerBCSID in the
ROcks DB needs to be validated with the BCSID stamped in the snapshot file. In
case it does not match, mark the replica as corrupt and report to SCM.
> Undetectable corruption after restart of a datanode
> ---------------------------------------------------
>
> Key: HDDS-1843
> URL: https://issues.apache.org/jira/browse/HDDS-1843
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Components: Ozone Datanode
> Affects Versions: 0.5.0
> Reporter: Shashikant Banerjee
> Assignee: Hrishikesh Gadre
> Priority: Major
> Fix For: 0.5.0
>
>
> Right now, all write chunks use BufferedIO ie, sync flag is disabled by
> default. Also, Rocks Db metadata updates are done in Rocks DB cache first at
> Datanode. In case, there comes a situation where the buffered chunk data as
> well as the corresponding metadata update is lost as a part of datanode
> restart, it may lead to a situation where, it will not be possible to detect
> the corruption (not even with container scanner) of this nature in a
> reasonable time frame, until and unless there is a client IO failure or Recon
> server detects it over time. In order to atleast to detect the problem, close
> container command on datanode should sync the rocks db file before moving the
> replica to Closed state. In such a way, ContainerScanner will be able to
> detect this.We can also add a metric around sync to measure how much of a
> throughput loss it can inncurr.
> Thanks [~msingh] for suggesting this.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]