nandakumar131 commented on a change in pull request #1401: HDDS-1561: Mark OPEN 
containers as QUASI_CLOSED as part of Ratis groupRemove
URL: https://github.com/apache/hadoop/pull/1401#discussion_r320873889
 
 

 ##########
 File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
 ##########
 @@ -800,6 +805,24 @@ public void notifyLogFailed(Throwable t, LogEntryProto 
failedEntry) {
     return future;
   }
 
+  @Override
+  public void notifyGroupRemove() {
+    ratisServer.notifyGroupRemove(gid);
+    // Make best effort to quasi-close all the containers on group removal.
+    // Containers already in terminal state like CLOSED or UNHEALTHY will not
+    // be affected.
+    for (Long cid : createContainerSet) {
+      try {
+        containerController.markContainerForClose(cid);
+      } catch (IOException e) {
+      }
+      try {
+        containerController.quasiCloseContainer(cid);
+      } catch (IOException e) {
+      }
+    }
+  }
+
 
 Review comment:
   If markContainerForClose fails, quasiCloseContainer will definitely fail. We 
can put both of the calls into same try catch.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to