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

Change executor service defaults (release-2.2) #242

Merged

Conversation

bestbeforetoday
Copy link
Member

@bestbeforetoday bestbeforetoday commented Nov 23, 2022

  • Set the default core and maximum thread pool size to Runtime.getRuntime().availableProcessors() + 1.
  • Use a fixed thread pool using the larger of core or maximum thread pool, and an unbounded queue to prevent failures submitting work when all threads are in use.
  • Make HFClient.getExecutorService() public.

The default (effectively) unlimited thread pool size could cause so many threads to be created under high event load that system failures could occur.

@bestbeforetoday bestbeforetoday force-pushed the executor-2.2 branch 4 times, most recently from 8e2b756 to 6f9373e Compare November 23, 2022 16:26
- Set the default core and maximum thread pool size to Runtime.getRuntime().availableProcessors() + 1.
- Use a fixed thread pool using the larger of core or maximum thread pool, and an unbounded queue to prevent failures submitting work when all threads are in use.
- Make HFClient.getExecutorService() public.

The default (effectively) unlimited thread pool size with blocking queue could cause so many threads to be created under high event load that system failures could occur.

Signed-off-by: Mark S. Lewis <[email protected]>
@bestbeforetoday bestbeforetoday marked this pull request as ready for review November 29, 2022 12:35
@bestbeforetoday bestbeforetoday requested a review from a team as a code owner November 29, 2022 12:35
@bestbeforetoday bestbeforetoday enabled auto-merge (squash) November 29, 2022 13:26
@bestbeforetoday bestbeforetoday merged commit 058f33e into hyperledger:release-2.2 Nov 29, 2022
@bestbeforetoday bestbeforetoday deleted the executor-2.2 branch May 9, 2023 10:34
@bestbeforetoday bestbeforetoday restored the executor-2.2 branch May 9, 2023 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants