[
https://issues.apache.org/jira/browse/RATIS-1892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17766774#comment-17766774
]
Xinyu Tan commented on RATIS-1892:
----------------------------------
[~szetszwo] What's your opinion?
> Unify the lifetime of the RaftServerProxy thread pool
> -----------------------------------------------------
>
> Key: RATIS-1892
> URL: https://issues.apache.org/jira/browse/RATIS-1892
> Project: Ratis
> Issue Type: Improvement
> Reporter: Xinyu Tan
> Assignee: Xinyu Tan
> Priority: Major
>
> Currently, we observe that within the RaftServerProxy, there are two thread
> pools: ImplExecutor and executor. Regarding the former, it is
> [closed|https://github.com/apache/ratis/blob/master/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerProxy.java#L413-L417]
> in the close method. However, for the latter, it is included within
> [lifeCycle.checkStateAndClose|https://github.com/apache/ratis/blob/master/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerProxy.java#L435-L438].
> This leads to a difference in the lifecycles of these two thread pools,
> resulting in some anomalies.
> For example, if we create a new RaftServerProxy instance and call close
> without invoking start, then the executor thread pool cannot be properly
> shutdown. Since it is not a daemon thread, this can prevent the JVM from
> exiting.
> Therefore, it might be necessary to align the lifecycle of the executor with
> that of implExecutor.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)