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


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java:
##########
@@ -714,6 +742,11 @@ public void close() throws IOException {
         ExitUtils.terminate(0, "SCM is decommissioned, terminate SCM", LOG);
         return;
       }
+      if (!ratisShutdownTimedOut) {

Review Comment:
   this check is not required as anyway need to call scm.shutdown.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java:
##########
@@ -252,6 +255,31 @@ public void notifyLogFailed(Throwable ex,
     ExitUtils.terminate(1, ex.getMessage(), ex, StateMachine.LOG);
   }
 
+  @Override
+  public void notifyServerShutdown(RaftProtos.RoleInfoProto roleInfo, boolean 
allServer) {
+    // If SCM is stopped, this shutdown originates from scm.stop(); otherwise 
it originates from Ratis.
+    if (!allServer || !isInitialized || scm.isStopped()) {

Review Comment:
   can remove allServer flag check



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