ivandika3 commented on code in PR #10941:
URL: https://github.com/apache/ozone/pull/10941#discussion_r4333643630


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/MutableVolumeSet.java:
##########
@@ -361,6 +361,17 @@ public void shutdown() {
     }
     volumeMap.clear();
 
+    // Shut down failed volumes too: their VolumeInfoMetrics is registered on
+    // creation (HDDS-7086) and must be unregistered on shutdown.
+    for (StorageVolume volume : failedVolumeMap.values()) {
+      try {
+        volume.shutdown();
+      } catch (Exception ex) {
+        LOG.error("Failed to shutdown failed volume : " + 
volume.getStorageDir(), ex);
+      }
+    }
+    failedVolumeMap.clear();

Review Comment:
   Good idea, thanks, updated.



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