zmuxuny opened a new issue, #5055: URL: https://github.com/apache/rocketmq-dashboard/issues/5055
### Before creating the bug report - [x] Searched open issues and PRs for concurrent cloud-credential updates and lost secret rotation. The open #5049/#5052 pair concerns client-cache invalidation after rotation, not persistence of overlapping edits. - [x] Traced the current `rocketmq-studio@0228dad5` update and repository paths. This report is based on a reproducible interleaving in those paths; a deterministic regression test will follow. ### Studio version and runtime `rocketmq-studio@0228dad5`, Cloud Credentials update API (`CloudCredentialService.update` and `MybatisPlusCloudCredentialRepository.replace`). No cloud account is required to trigger the persistence race. ### Problem and reproduction `UpdateCloudCredentialDTO` allows individual fields to be omitted, but the service loads the entire credential, applies supplied fields to that snapshot, and calls `replace`, which writes the whole entity. These independent requests can overlap: 1. Secret rotation A and name-only edit B both read the same row with the old secret. 2. A writes the new secret through `replace` and reports success. 3. B changes only its local copy's name, then `replace` writes that copy's old secret back to the database. 4. Both requests report success, but the secret rotation has been undone. A later client-cache invalidation cannot recover the new value from storage. The same stale whole-row write can lose other independently edited fields. The service has no transaction/row lock across its read and write, and the repository update has no version condition or field-level patch. ### Expected behavior A name or remark edit must not overwrite a concurrent secret rotation, and a secret rotation must not revert a concurrent metadata edit. Only fields supplied by a request should be written atomically, while updates to a deleted credential still report not found. Add a regression that controls the interleaving and checks the persisted secret and metadata. -- 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]
