[
https://issues.apache.org/jira/browse/HDFS-17094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17744210#comment-17744210
]
ASF GitHub Bot commented on HDFS-17094:
---------------------------------------
Hexiaoqiao commented on code in PR #5854:
URL: https://github.com/apache/hadoop/pull/5854#discussion_r1266726577
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecoveryStriped.java:
##########
@@ -17,6 +17,10 @@
*/
package org.apache.hadoop.hdfs;
+import org.apache.hadoop.hdfs.protocol.LocatedBlock;
+import org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor;
+import org.apache.hadoop.hdfs.server.datanode.DataNodeTestUtils;
+import
org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.TestInterDatanodeProtocol;
Review Comment:
Please sort the import to the proper line. Here it should be Line33 ~ Line35.
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecoveryStriped.java:
##########
@@ -188,6 +192,62 @@ public void testLeaseRecovery() throws Exception {
}
}
+ /**
+ * Test that the lease recovery results meet expectations when there an
Review Comment:
Test lease recovery for EC policy when one internal block located on stale
datanode.
> EC: Fix bug in block recovery when there are stale datanodes
> ------------------------------------------------------------
>
> Key: HDFS-17094
> URL: https://issues.apache.org/jira/browse/HDFS-17094
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Shuyan Zhang
> Assignee: Shuyan Zhang
> Priority: Major
> Labels: pull-request-available
>
> When a block recovery occurs, `RecoveryTaskStriped` in datanode expects
> `rBlock.getLocations()` and `rBlock. getBlockIndices()` to be in one-to-one
> correspondence. However, if there are locations in stale state when NameNode
> handles heartbeat, this correspondence will be disrupted. In detail, there is
> no stale location in `recoveryLocations`, but the block indices array is
> still complete (i.e. contains the indices of all the locations). This will
> cause `BlockRecoveryWorker.RecoveryTaskStriped#recover` to generate a wrong
> internal block ID, and the corresponding datanode cannot find the replica,
> thus making the recovery process fail. This bug needs to be fixed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]