unbridled-41 opened a new issue, #6014: URL: https://github.com/apache/rocketmq-dashboard/issues/6014
### Studio Version branch: `rocketmq-studio` @ `7e7aa344` ### Runtime Environment Backend tests: `cd server && mvn -o -B -ntp test -Dtest='MybatisPlusAclRepositoryTest'`. ### Describe the Bug `createAndUpdatePlainAccessConfig` rewrites `username` to the accessKey and updates by id, but only its insert branch translates a unique-key collision. When another row already owns that username - the account was renamed away from it through the ACL users form and the name was taken afterwards, or both happen concurrently - the DuplicateKeyException reached the generic handler as 500 "Internal Server Error", and the whole upsert (account plus its rule replacement) rolled back with no usable reason. `saveUser`, `replaceUser` and this method's own insert already answer 409. ### Steps to Reproduce 1. Upsert a plain-access account for accessKey K. 2. Rename its username through the ACL users form. 3. Create a user named K. 4. Re-save the plain-access account: 500. ### What Did You Expect to See? A 409 naming the username, like the sibling write paths. ### What Did You See Instead? A generic 500. ### Impact A legitimate save fails with no reason, and the rule replacement rolls back with it. ### Acceptance Criteria The update branch translates the collision the way the other paths do, with a regression test. **Corresponding PR:** #ISSUEPR# -- 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]
