sumitagrawl commented on code in PR #4773:
URL: https://github.com/apache/ozone/pull/4773#discussion_r1212536582


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerSet.java:
##########
@@ -179,21 +182,35 @@ public int containerCount() {
     return containerMap.size();
   }
 
-  public void handleVolumeFailures() {
+  /**
+   * Remove all containers belonging to failed volume.
+   * Send FCR which will not contain removed containers.
+   *
+   * @param  context StateContext
+   * @return
+   */
+  public void handleVolumeFailures(StateContext context) {
+    AtomicBoolean failedVolume = new AtomicBoolean(false);
     containerMap.values().forEach(c -> {
       if (c.getContainerData().getVolume().isFailed()) {
-        try {
-          c.markContainerUnhealthy();
-          LOG.info("Marking Container {} UNHEALTHY as the Volume {} " +
+        removeContainer(c.getContainerData().getContainerID());
+        LOG.info("Removing Container {} as the Volume {} " +

Review Comment:
   please check if requried to add this container in missingContainerSet?



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