[
https://issues.apache.org/jira/browse/HDFS-17556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18022935#comment-18022935
]
ASF GitHub Bot commented on HDFS-17556:
---------------------------------------
github-actions[bot] closed pull request #6896: HDFS-17556. Avoid adding block
to neededReconstruction repeatedly in decommission
URL: https://github.com/apache/hadoop/pull/6896
> Avoid adding block to neededReconstruction repeatedly in decommission
> ---------------------------------------------------------------------
>
> Key: HDFS-17556
> URL: https://issues.apache.org/jira/browse/HDFS-17556
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: namenode
> Affects Versions: 3.5.0
> Reporter: caozhiqiang
> Assignee: caozhiqiang
> Priority: Major
> Labels: pull-request-available
>
> In decommission and maintenance process, before added to
> BlockManager::neededReconstruction block will be check if it has been added.
> The check contains if block is in BlockManager::neededReconstruction or in
> PendingReconstructionBlocks::pendingReconstructions as below code.
> But it also need to check if it is in
> PendingReconstructionBlocks::timedOutItems. Or else
> DatanodeAdminDefaultMonitor will add block to
> BlockManager::neededReconstruction repeatedly if block time out in
> PendingReconstructionBlocks::pendingReconstructions.
>
> {code:java}
> if (!blockManager.neededReconstruction.contains(block) &&
> blockManager.pendingReconstruction.getNumReplicas(block) == 0 &&
> blockManager.isPopulatingReplQueues()) {
> // Process these blocks only when active NN is out of safe mode.
> blockManager.neededReconstruction.add(block,
> liveReplicas, num.readOnlyReplicas(),
> num.outOfServiceReplicas(),
> blockManager.getExpectedRedundancyNum(block));
> } {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]