zmuxuny opened a new pull request, #5252: URL: https://github.com/apache/rocketmq-dashboard/pull/5252
### Which Issue(s) This PR Fixes - Fixes #5049. ### Problem Rotating an Aliyun credential invalidates its cached OpenAPI clients. Previously, `invalidateCredential` could finish while a cache miss was still building a client from the old secret. That client could then enter the cache after invalidation and be reused by later requests. ### Changes Coordinate cache misses and invalidation on the factory monitor, so a client being created is published before invalidation removes and closes it. Cached lookups retain the direct `ConcurrentHashMap` read path. This is scoped to the Aliyun OpenAPI client cache; the Tencent factory already coordinates its corresponding path. ### Previous Submission This replaces #5052, which the inactivity bot closed after seven days without activity. The original PR contains the earlier discussion and regression-test history. The linked issue remains open and the fix remains needed on the development branch. The original branch was refreshed onto `rocketmq-studio@a460673f`, preserving upstream changes. Tested head: `d5b21400a526c71f6914951aa32a06c23c0b36a5`. ### How Did You Test This Change? Validation rerun on the refreshed branch on 2026-10-01: - `cd server && mvn -B -ntp -Dtest=AliyunClientFactoryTest,CloudCredentialServiceTest test`: **28 passed**; Checkstyle passed. Local execution used the Mockito Java agent required by the installed JDK. - A deterministic concurrency regression pauses first-client creation, starts credential invalidation, and checks that the first client is closed and the next lookup creates a replacement. The regression originally failed against unmodified trunk because the old client was reused. - `git diff --check`: passed. These are focused backend results, not a full-suite pass. Full CI is pending for this refreshed head. Known unrelated upstream frontend blockers include `MetricsExplorer.test.tsx:516` TS2353 and the separate final-artifact license gate tracked in #5019; this backend change does not alter those paths. The refreshed base includes #5020 and #5029. ### Checklist - [x] One coherent bug fix; no unrelated changes - [x] Conventional Commit subjects - [x] Deterministic concurrency regression - [x] No new UI text, API contract, or source files - [ ] Full CI is green -- 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]
