smengcl commented on code in PR #11264:
URL: https://github.com/apache/ozone/pull/11264#discussion_r4056155936
##########
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:
```diff
---
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeStateMachine.java
+++
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeStateMachine.java
@@ -408,8 +408,7 @@
* startup watchdog.
*/
public void triggerFatalShutdown(String reason) {
- LOG.error("DatanodeStateMachine shutdown triggered: {}", reason);
- hddsDatanodeStopService.stopService();
+ ExitUtils.terminate(1, reason, LOG);
}
```
The regression test needs to be updated accordingly.
--
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]