You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "zmuxuny (via GitHub)" <gi...@apache.org> on 2026/09/23 17:39:50 UTC

[PR] fix(aliyun): prevent stale clients after credential rotation [rocketmq-dashboard]

zmuxuny opened a new pull request, #5052:
URL: https://github.com/apache/rocketmq-dashboard/pull/5052

   ### Which Issue(s) This PR Fixes
   
   - Fixes #5049
   
   ### Brief Description
   
   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.
   
   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. The change is scoped to the Aliyun OpenAPI client cache; the Tencent factory already coordinates its corresponding path.
   
   ### How Did You Test This Change?
   
   - Added a deterministic concurrency regression that pauses first-client creation, starts credential invalidation, then checks that the first client is closed and the next lookup creates a replacement. The final lookup failed against the unmodified `rocketmq-studio` code because it returned the old client.
   - `cd server && mvn -B -ntp -Dtest=AliyunClientFactoryTest,CloudCredentialServiceTest test` — 28 tests passed; Checkstyle passed.
   - `git diff --check` — passed.
   
   ### Checklist
   
   - [x] One coherent bug fix; no unrelated changes
   - [x] Conventional commit subject
   - [x] Regression test added with a `...Test` method name
   - [x] No new UI text, API contract, or source files
   


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(aliyun): prevent stale clients after credential rotation [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5052:
URL: https://github.com/apache/rocketmq-dashboard/pull/5052#issuecomment-5922143187

   This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(aliyun): prevent stale clients after credential rotation [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #5052: fix(aliyun): prevent stale clients after credential rotation
URL: https://github.com/apache/rocketmq-dashboard/pull/5052


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org