[
https://issues.apache.org/jira/browse/HDDS-1843?focusedWorklogId=305686&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-305686
]
ASF GitHub Bot logged work on HDDS-1843:
----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Sep/19 16:40
Start Date: 03/Sep/19 16:40
Worklog Time Spent: 10m
Work Description: supratimdeka commented on pull request #1364:
HDDS-1843. Undetectable corruption after restart of a datanode.
URL: https://github.com/apache/hadoop/pull/1364#discussion_r320368137
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/HddsDispatcher.java
##########
@@ -329,6 +336,21 @@ private ContainerCommandResponseProto dispatchRequest(
}
}
+ private void updateBCSID(Container container,
+ DispatcherContext dispatcherContext, ContainerProtos.Type cmdType) {
+ long bcsID = container.getBlockCommitSequenceId();
+ long containerId = container.getContainerData().getContainerID();
+ Map<Long, Long> container2BCSIDMap;
+ if (dispatcherContext != null && (cmdType == ContainerProtos.Type.PutBlock
Review comment:
an alternative implementation would be to ignore the cmdType.
For all requests, read the BCS ID from the map and compare it to the bcsid
from the container. if the map value is lower, then update it to the value from
the container.
Advantage:
updateBCSID function becomes de-coupled from the knowledge of which cmdType
changes the bcsid.
Disadvantage:
possibly more CPU cost, because every request will pay the cost of reading
the bcsid map. but it might be premature to assume that this additional cost
will be significant.
----------------------------------------------------------------
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: 305686)
> 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: Shashikant Banerjee
> Priority: Critical
> Labels: pull-request-available
> Fix For: 0.5.0
>
> Attachments: HDDS-1843.000.patch
>
> Time Spent: 5h 10m
> Remaining Estimate: 0h
>
> 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, Ratis
> snapshot on datanode should sync the rocks db file . 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 incurr.
> Thanks [~msingh] for suggesting this.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]