[ 
https://issues.apache.org/jira/browse/HDFS-16443?focusedWorklogId=717071&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-717071
 ]

ASF GitHub Bot logged work on HDFS-16443:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Jan/22 15:17
            Start Date: 28/Jan/22 15:17
    Worklog Time Spent: 10m 
      Work Description: KevinWikant opened a new pull request #3942:
URL: https://github.com/apache/hadoop/pull/3942


   ### Description of PR
   
   A rare edge case was noticed in DatanodeAdminDefaultMonitor which causes a 
DatanodeDescriptor to be added twice to the pendingNodes queue. 
   
   - a [datanode is unhealthy so it gets added to 
"unhealthyDns"](https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminDefaultMonitor.java#L227)
   - an exception is thrown which causes [this catch 
block](https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminDefaultMonitor.java#L271)
 to execute
   - the [datanode is added to 
"pendingNodes"](https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminDefaultMonitor.java#L276)
   - under certain conditions the [datanode can be added again from 
"unhealthyDns" to "pendingNodes" 
here](https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminDefaultMonitor.java#L296)
   
   ### How was this patch tested?
   
   All "TestDecommission" & "DatanodeAdminManager" tests pass when run locally
   
   Same manual testing from https://github.com/apache/hadoop/pull/3675 applies.
   
   ### For code changes:
   
   - [x] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [n/a ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [n/a] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [n/a] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   


-- 
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]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 717071)
    Remaining Estimate: 0h
            Time Spent: 10m

> Fix edge case where DatanodeAdminDefaultMonitor doubly enqueues a 
> DatanodeDescriptor on exception
> -------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-16443
>                 URL: https://issues.apache.org/jira/browse/HDFS-16443
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs
>            Reporter: Kevin Wikant
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> As part of the fix merged in: https://issues.apache.org/jira/browse/HDFS-16303
> There was a rare edge case noticed in DatanodeAdminDefaultMonitor which 
> causes a DatanodeDescriptor to be added twice to the pendingNodes queue. 
>  * a [datanode is unhealthy so it gets added to 
> "unhealthyDns"]([https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminDefaultMonitor.java#L227)]
>  * an exception is thrown which causes [this catch 
> block](https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminDefaultMonitor.java#L271)
>  to execute
>  * the [datanode is added to 
> "pendingNodes"]([https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminDefaultMonitor.java#L276)]
>  * under certain conditions the [datanode can be added again from 
> "unhealthyDns" to "pendingNodes" 
> here]([https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminDefaultMonitor.java#L296)]
> This Jira is to track the 1 line fix for this bug



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to