KevinWikant commented on pull request #3675:
URL: https://github.com/apache/hadoop/pull/3675#issuecomment-975759431


   > If a node goes dead while decommissioning, would it not be better to just 
remove it from the decommission monitor rather than keep tracking it there at 
all? If the node comes alive again, it should be entered back into the monitor.
   > We could either detect it is dead in the monitor and remove it from 
tracking then, or have the place that logs the mentioned "node is dead while 
decommission in progress" remove it from the monitor.
   
   I agree with this statement & this is essentially the behavior this code 
change provides with 1 caveat "If the node comes alive again _OR if there are 
no (potentially healthy) nodes in the pendingNodes queue_, it will be entered 
back into the monitor"
   
   Consider the 2 alternatives:
   A) Do not track an unhealthy node until it becomes healthy
   B) Do not track an unhealthy node until it becomes healthy OR until there 
are no (potentially healthy) nodes in the pendingNodes queue
   
   Note that both alternatives do not prevent healthy nodes from being 
decommissioned. With Option B) if there are more nodes being decommissioned 
than can be tracked, any unhealthy nodes being tracked will be removed from the 
tracked set & re-queued (with a priority lower than all healthy nodes in the 
priority queue); then the healthy nodes will be de-queued & moved to the 
tracked set
   
   It may seem Option A) is more performant as it avoids tracking unhealthy 
nodes each DatanodeAdminMonitor cycle, but this may not be the case as we will 
still need to be checking the health status of these unhealthy queued nodes to 
determine if they should be tracked. Furthermore, tracking unhealthy nodes is 
the current behavior & as far as I know it has not caused any performance 
problems.
   
   With Option B) unhealthy nodes are only tracked (and there health status is 
only checked) when there are fewer healthy nodes than 
"dfs.namenode.decommission.max.concurrent.tracked.nodes". This may result in 
superior performance for Option B) as it will only need to check the health of 
up to "dfs.namenode.decommission.max.concurrent.tracked.nodes" unhealthy nodes, 
rather than having to check the health of all nodes in the pendingNodes queue.
   
   Note that the log "node is dead while decommission in progress", occurs from 
within the DatanodeAdminMonitor:
   - 
https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminDefaultMonitor.java#L240
   - 
https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java#L4549


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

Reply via email to