yyqdbngt opened a new pull request, #2924: URL: https://github.com/apache/rocketmq-dashboard/pull/2924
## Summary `buildTopology()` submits every probe with `CompletableFuture.supplyAsync(...)`. When the overall budget elapses, `awaitProbe()` cancels the unfinished futures — but cancelling a `supplyAsync` future does **not** unqueue its task. Probes that were still waiting in the bounded 8-thread probe pool therefore ran their socket work later, after the topology had already been returned, pinning pool threads with results nobody reads (up to 2 s each, times every queued probe, on every overloaded request). `probeAsync()` now completes the future from the task itself and skips the probe when the future is already done (cancelled or rejected), so queued-but-unstarted probes become no-ops. Probes that already started behave exactly as before. ## Why With many unreachable proxies the probe queue grows; after each budget-exceeded topology call the pool kept doing stale work, and under repeated requests the stale tasks can outlive the pool's usefulness — a classic cancelled-future leak. ## Testing Extended `ProxyAddressServiceTest`: a single-thread executor with a 300 ms budget, where the first probe blocks on a latch and the second probe's task sits in the queue. After the budget cancels both futures, the gate opens; the queued task must run without invoking the probe. ``` mvn -q -Dtest=ProxyAddressServiceTest test Tests run: 18, Failures: 0, Errors: 0, Skipped: 0 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
