JacksonYao287 commented on a change in pull request #2953:
URL: https://github.com/apache/ozone/pull/2953#discussion_r809762896
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java
##########
@@ -387,10 +387,20 @@ public void reinitialize() throws IOException {
@Override
public void close() throws IOException {
+ super.close();
+ stop();
+ try {
+ ExitUtils.terminate(1, "scm state machine terminated by ratis", LOG);
+ } catch (ExitUtils.ExitException e) {
+ LOG.info("scm state machine is terminated by Ratis, " +
+ "but termination is disabled: {}", e.getMessage());
+ }
+ }
+
+ public void stop() throws IOException {
if (!isInitialized) {
return;
}
Review comment:
yes, if not initialized, `transactionBuffer` and
`installSnapshotExecutor` is null.
--
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]