Aias00 opened a new pull request, #6963: URL: https://github.com/apache/rocketmq-dashboard/pull/6963
### Which Issue(s) This PR Fixes - Fixes #6962 ### Brief Description Two ownership migrations can race to create `uk_group_name`. H2 reports that the competing index already exists, while the immediate metadata read does not yet confirm its complete definition. Startup then fails even though the required index is being published. This occurred in the Backend Tests for documentation-only #6954. After failed CREATE, recheck the exact expected uniqueness/column definition at most five times, with 10 ms between unsuccessful reads. Accept only an identical index. If the index remains missing, is incompatible or duplicate data prevents creation, preserve the SQL failure; interruption restores the interrupt flag and preserves that failure too. This follows the metadata-retry approach merged in #6736, which covered a thrown `ConcurrentModificationException` but not a temporarily nonmatching metadata result. The open #6175 offers process-wide serialization as an alternative; this patch keeps the migration concurrent and adds deterministic coverage of this remaining publication boundary. ### How Did You Test This Change? - Deterministic regression: use real H2 DDL with only the competing index's metadata visibility delayed. The old code fails with the same `Index "uk_group_name" already exists` error as CI; the fix passes. - Negative cases retain failure for wrong uniqueness, wrong columns, duplicate data inserted after precheck, persistent missing/invisible metadata and interruption. - Java 21: `mvn -B -ntp test -Dtest='ResourceOwnershipIndexPublicationTest,ResourceOwnershipGuardTest,InstanceServiceTest'` — **139 tests, 0 failures/errors/skips**, Checkstyle passed. - Original `migrationConcurrentStartupIsIdempotentTest` repeated eight times — **8 passed / 0 failed**, without changing or serializing that test. - `git diff --check` passed; no dependencies or workflow changes. Failure log: https://github.com/apache/rocketmq-dashboard/actions/runs/39145822282/job/117729324192 ### Checklist - [x] One coherent startup/CI race fix - [x] Conventional Commit and DCO sign-off - [x] Regression tests; methods end in Test - [x] ASF header on new test - [x] No UI, API, schema or dependency 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
