Frun1na opened a new pull request, #5297:
URL: https://github.com/apache/rocketmq-dashboard/pull/5297
### Which Issue(s) This PR Fixes
- Fixes #5296
### Brief Description
`createInstance` checks name uniqueness before inserting
(`requireUniqueInstanceName`), but two concurrent creates can both pass the
check; the loser then hits the `uk_instance_name` unique key. Only the
`fk_instance_cloud_credential` violation was translated, so the duplicate-name
race propagated as a generic `DataIntegrityViolationException` and the user saw
an opaque 500. The catch block now recognizes the constraint and throws
`DuplicateInstanceNameException`, the same outcome the sequential case produces.
### How Did You Test This Change?
```
cd server && mvn -B -ntp test -Dtest=InstanceServiceTest
Tests run: 47, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS
```
---
Re-submission of #4936: the original PR was closed by the stale bot after 7
days without review activity, and GitHub now rejects reopening pull requests in
this repository ("state cannot be changed"), so the same change is re-submitted
rebased onto the current `rocketmq-studio` tip (`a460673f`). The original
review thread stays available at #4936.
--
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]