youngkermit8-coder opened a new pull request, #2375:
URL: https://github.com/apache/rocketmq-dashboard/pull/2375

   ## Summary
   
   - map database unique-key races during instance creation to HTTP 409
   - return the same conflict status when the application precheck finds an 
existing name
   - preserve the existing safe duplicate-name message without exposing 
database details
   - cover both the precheck path and a simulated concurrent-insert loser
   
   ## Root cause
   
   The instance-name lookup and database insert are separate operations. 
Concurrent create requests can both pass the lookup before one insert wins the 
`uk_instance_name` constraint. The losing request previously leaked 
`DuplicateKeyException` to the generic exception handler and returned HTTP 500; 
a duplicate found slightly earlier returned 400 instead.
   
   ## Impact
   
   Duplicate database-backed instance creation now has a stable 
resource-conflict contract regardless of request timing. Failed creates still 
do not emit a successful operation audit.
   
   ## Validation
   
   - baseline on exact `rocketmq-studio` head: both new regressions failed (400 
precheck and raw `DuplicateKeyException`)
   - `mvn -B -ntp -Dtest=InstanceServiceTest test` — 57 tests passed
   - `mvn -B -ntp test` — 1356 tests passed
   - Checkstyle — 0 violations
   - `git diff --check` — passed
   
   Fixes #2374
   


-- 
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]

Reply via email to