zhangshuyan0 commented on code in PR #6176:
URL: https://github.com/apache/hadoop/pull/6176#discussion_r1362023878
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeDescriptor.java:
##########
@@ -1007,6 +1013,7 @@ public void updateRegInfo(DatanodeID nodeReg) {
for(DatanodeStorageInfo storage : getStorageInfos()) {
if (storage.getStorageType() != StorageType.PROVIDED) {
storage.setBlockReportCount(0);
+ storage.setBlockContentsStale(true);
Review Comment:
> StaleStorage is used to prevent the namenode from deleting replicas of
blocks whose replicas are indeterminate.
About StaleStorage we can say comments in code:
https://github.com/apache/hadoop/blob/42e695d510befabf3b7cfc52349b0d78faadb249/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeStorageInfo.java#L142-L149
> At startup or at failover, the storages in the cluster may have pending
block deletions from a previous incarnation of the NameNode.
From this, it can be seen that, the design of the "stale content" is to
address the "indeterminate" caused by pending deletions. By the way, if the
information provided by ExcessRedundancyMap is accurate, there will be no
"indeterminate" caused by pending deletions.
See also: https://issues.apache.org/jira/browse/HDFS-1972
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]