Tejaskriya commented on code in PR #6367:
URL: https://github.com/apache/ozone/pull/6367#discussion_r1538703474


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/NodeDecommissionManager.java:
##########
@@ -368,6 +382,50 @@ public synchronized void startDecommission(DatanodeDetails 
dn)
     }
   }
 
+  private synchronized boolean 
checkIfDecommissionPossible(List<DatanodeDetails> dns, List<DatanodeAdminError> 
errors) {
+    // do we require method synchronization?
+    int minInService = -1; // maxRatis = -1, maxEc = -1;
+    for (DatanodeDetails dn : dns) {
+      Set<ContainerID> containers;
+      try {
+        containers = nodeManager.getContainers(dn);

Review Comment:
   Yes, as you have pointed out, we cannot rely on the RM as using stale data 
for the fail-early check here as it would be dangerous. The only other way that 
came up was to iterate through the containers like in this PR



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