-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: custom thread pool #853
Comments
hi, i want to perform this task |
@farawayliu Sure! Feel free to try it. |
i have finished send AppendEntries, i have a question, why shutdown programs can't share CLOSURE_EXECUTOR? |
hah, i misunderstood the meaning of CLOSURE_EXECUTOR |
@killme2008 hi, i have completed this task, please review. #855 |
@farawayliu Cool, i will review it today. |
RPC: custom thread pool
Right now, jraft use global thread pool to execute callback closures or send log entries as below:
sofa-jraft/jraft-core/src/main/java/com/alipay/sofa/jraft/rpc/impl/core/DefaultRaftClientService.java
Line 63 in 4f9f779
sofa-jraft/jraft-core/src/main/java/com/alipay/sofa/jraft/util/Utils.java
Line 108 in 4f9f779
The users can't change the thread pool behaviour by themself except setting enviroment variable such as
-Djraft.closure.threadpool.size.max=xxx
etc. And when using multi raft group in one java process, the global thread pool can't provide any isolations between groups and make the service not robust enough.So i think we can provide a way to let users custom thread pool for every raft group just like
StorageOptionsFactory
. If the users doesn't provide a custom thread pool, we use the global one as before.The text was updated successfully, but these errors were encountered: