ivandika3 commented on code in PR #7459:
URL: https://github.com/apache/ozone/pull/7459#discussion_r1865158466
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/LegacyReplicationManager.java:
##########
@@ -333,6 +341,11 @@ public LegacyReplicationManager(final ConfigurationSource
conf,
.setDBTransactionBuffer(scmhaManager.getDBTransactionBuffer())
.setRatisServer(scmhaManager.getRatisServer())
.setMoveTable(moveTable).build();
+
+ inflightMoveScannerExecutor = Executors.newSingleThreadExecutor(
Review Comment:
Yes, `ReplicationManager#stop` is called either in SCM shutdown through
(`SCMServiceManager#stop`) or through the "stop replicationManager" command.
The reason I decided to now shutdown the `inflightMoveScannerExecutor` since
once the `ExecutorService` is shutdown, we cannot submit any new task anymore.
Therefore, we need to recreate this `ExecutorService` every time in `start`.
However, managing this `ExecutorService`s lifecycles with the different Raft
states might have some edge cases and error prone (which might cause
`RejectedExecutionException` or ` NullPointerException`), this might terminate
the `StateMachineUpdater`. Therefore, I try to make it simple and just let the
`ExecutorService` to stop when SCM is shutdown (through the `ExecutorService`
finalizer mechanism).
--
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]