devmadhuu commented on code in PR #11264:
URL: https://github.com/apache/ozone/pull/11264#discussion_r4061364302


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeStateMachine.java:
##########
@@ -400,6 +400,18 @@ private void startStateMachineThread() throws IOException {
     }
   }
 
+  /**
+   * Terminates the datanode when startup cannot make progress and the state
+   * machine loop cannot drive the shutdown itself (for example when container
+   * initialization has stalled on a thread that ignores interruption). Invoked
+   * from the {@link 
org.apache.hadoop.ozone.container.ozoneimpl.OzoneContainer}
+   * startup watchdog.
+   */
+  public void triggerFatalShutdown(String reason) {
+    LOG.error("DatanodeStateMachine shutdown triggered: {}", reason);
+    hddsDatanodeStopService.stopService();

Review Comment:
   Okay thanks @smengcl for catching that scanner flow part. I have now 
shutdown as part of terminate thread. Can you have a re-look please ?



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