sadanand48 commented on code in PR #9953:
URL: https://github.com/apache/ozone/pull/9953#discussion_r2999286223


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/safemode/AbstractContainerSafeModeRule.java:
##########
@@ -135,14 +181,48 @@ public double getCurrentContainerThreshold() {
 
   @Override
   public synchronized void refresh(boolean forceRefresh) {
-    if (forceRefresh || !validate()) {
+    if (forceRefresh) {
       initializeRule();
     }
+    if (!validate()) {
+      // iterate through open containers and check if any of them have moved 
to closed state
+      for(ContainerID containerID : openContainers.keySet()) {
+        try {
+        ContainerInfo containerInfo = 
containerManager.getContainer(containerID);

Review Comment:
   This will be exactly like the previous behaviour if we are getting the whole 
closed container list from container manager.



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