Aias00 opened a new pull request, #919: URL: https://github.com/apache/rocketmq-dashboard/pull/919
### What is changed This PR fixes #918 by rejecting duplicate mock topic creates within the same cluster. ### Why `createTopic()` previously inserted a new mock row without checking for an existing topic with the same `name` and `clusterId`. Since follow-up mock update/delete actions identify topics by name, allowing duplicate names in one cluster can make later actions ambiguous. This is intentionally scoped to same-cluster duplicate creation. The broader cross-cluster identity problem remains tracked by #739. ### How it is fixed - Check for an existing topic with the same `name` and `clusterId` before inserting a mock topic. - Add a regression test that verifies the duplicate create is rejected and the existing cluster topic list remains unchanged. ### Verification - `npm test -- --run src/services/topicService.test.ts` - `git diff --check` - `npm run lint -- src/services/topicService.ts src/services/topicService.test.ts` (passes with existing fast-refresh warnings in unrelated files) -- 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]
