Commit 68c69df
Async event bus publishing in AsyncJobManagerImpl to reduce API thread contention
publishOnEventBus() was calling _messageBus.publish() synchronously on the
request thread, which blocks on MessageBusBase$Gate (an exclusive mutex).
JFR analysis showed this causing up to 107ms waits on Jetty request threads,
contributing to 502 errors from the upstream load balancer.
Move event bus publishing to a dedicated single-threaded executor so API
request threads are no longer blocked by Gate contention. Event ordering
is preserved by the single-threaded executor.1 parent 4708121 commit 68c69df
File tree
1 file changed
+9
-2
lines changed- framework/jobs/src/main/java/org/apache/cloudstack/framework/jobs/impl
1 file changed
+9
-2
lines changedLines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| |||
1378 | 1379 | | |
1379 | 1380 | | |
1380 | 1381 | | |
| 1382 | + | |
1381 | 1383 | | |
1382 | 1384 | | |
1383 | 1385 | | |
| |||
1397 | 1399 | | |
1398 | 1400 | | |
1399 | 1401 | | |
1400 | | - | |
1401 | | - | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
1402 | 1409 | | |
1403 | 1410 | | |
1404 | 1411 | | |
| |||
0 commit comments