You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ivandika3 (via GitHub)" <gi...@apache.org> on 2024/12/02 02:54:11 UTC

Re: [PR] HDDS-11750. LegacyReplicationManager#notifyStatusChanged should submit Ratis request asynchronously [ozone]

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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org