Skip to content
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

Closed
killme2008 opened this issue Jun 23, 2022 · 6 comments
Closed

RFC: custom thread pool #853

killme2008 opened this issue Jun 23, 2022 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@killme2008
Copy link
Contributor

killme2008 commented Jun 23, 2022

RPC: custom thread pool

Right now, jraft use global thread pool to execute callback closures or send log entries as below:

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.

  • Main goals:
    • Let user custom closure execution and sending entries thread pools
    • Provides isolation between raft groups in one java process.
@killme2008 killme2008 added enhancement New feature or request help wanted Extra attention is needed labels Jun 23, 2022
@shihuili1218
Copy link
Collaborator

hi, i want to perform this task

@killme2008
Copy link
Contributor Author

@farawayliu Sure! Feel free to try it.

@shihuili1218
Copy link
Collaborator

i have finished send AppendEntries, i have a question, why shutdown programs can't share CLOSURE_EXECUTOR?
#855

@shihuili1218
Copy link
Collaborator

i have finished send AppendEntries, i have a question, why shutdown programs can't share CLOSURE_EXECUTOR? #855

hah, i misunderstood the meaning of CLOSURE_EXECUTOR

@shihuili1218
Copy link
Collaborator

@killme2008 hi, i have completed this task, please review. #855

@killme2008
Copy link
Contributor Author

@farawayliu Cool, i will review it today.

@fengjiachun fengjiachun mentioned this issue Dec 13, 2022
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants