This repository was archived by the owner on Apr 22, 2025. It is now read-only.
Commit 058f33e
authored
Change executor service defaults (#242)
- 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]>1 parent 2a77b64 commit 058f33e
File tree
2 files changed
+11
-20
lines changed- src/main/java/org/hyperledger/fabric/sdk
- helper
2 files changed
+11
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | | - | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
| |||
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
69 | | - | |
| 67 | + | |
70 | 68 | | |
71 | 69 | | |
72 | 70 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
81 | 76 | | |
82 | 77 | | |
83 | 78 | | |
| |||
97 | 92 | | |
98 | 93 | | |
99 | 94 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 95 | + | |
104 | 96 | | |
105 | 97 | | |
106 | 98 | | |
| |||
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | | - | |
31 | 29 | | |
32 | 30 | | |
33 | 31 | | |
| |||
182 | 180 | | |
183 | 181 | | |
184 | 182 | | |
185 | | - | |
186 | | - | |
187 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
| |||
0 commit comments