btlqql opened a new issue, #1044: URL: https://github.com/apache/rocketmq-dashboard/issues/1044
## Problem `RocketMQAdminClientImpl` persists topic/group metadata keyed by `(cluster_id, name)`, but four operations scope their DB queries by `name` alone: - `createTopic` / `updateTopic` read the existing perm with `selectOne(...eq(RmqTopic::getName, topicName))`. When the same topic name exists in more than one cluster (a common multi-cluster mirror setup), MyBatis-Plus throws `TooManyResultsException`, which the outer catch turns into a generic 500 "Failed to create/update topic". - `deleteTopic` removes the DB row with `delete(...eq(RmqTopic::getName, name))` — it deletes **every cluster's** row for that name, not just the current cluster's. Deleting a topic in cluster A silently removes cluster B's metadata. - `deleteConsumerGroup` does the same for `RmqGroup`. The create path already demonstrates the correct scope: it queries by `(clusterId, name)` before inserting (see the `selectOne` guarding the unique key). ## Expected All four operations scope their DB access by the current cluster, matching the `(cluster_id, name)` primary key. ## Acceptance criteria - `createTopic` / `updateTopic` no longer throw when the same topic name exists in another cluster. - `deleteTopic` deletes only the current cluster's topic row. - `deleteConsumerGroup` deletes only the current cluster's group row. - Unit tests cover the same-name-different-cluster path for create/update/delete. -- 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]
