Wang1rrr opened a new pull request, #6971: URL: https://github.com/apache/rocketmq-dashboard/pull/6971
### Which Issue(s) This PR Fixes Fixes #6968. ### Brief Description Serialize the cache lookup and refresh in `AgentCapabilityProbe.binaries()`. Atomic publication alone lets concurrent requests all observe a cold/expired cache and each launch a complete round of CLI subprocesses. With the method monitor, waiting callers reuse the first completed round. The existing 60-second TTL, per-instance cache, and availability flags are preserved. This is separate from #5671, which adds sequential cache/flag tests; the regression here uses a different test class and covers overlapping requests. ### How Did You Test This Change? - Added latch-controlled concurrent request regressions for a cold cache and the exact TTL expiry boundary. - Both cases fail on the original implementation because the requests produce separate probe results. - Java 21 / Maven 3.9: `mvn -B -ntp -Dtest=AgentCapabilityProbeConcurrencyTest test`: 2 parameterized cases passed, zero Checkstyle violations. - Each case checks that only three binary lookups occur, both callers share the result, and a subsequent cache hit performs no extra lookups. ### Checklist - [x] One coherent defect fix with a conventional commit. - [x] Regression method ends in `Test`. - [x] No new dependencies, UI text, or package dependencies. -- 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]
