RockteMQ-AI commented on issue #918:
URL: 
https://github.com/apache/rocketmq-dashboard/issues/918#issuecomment-5706858727

   **Issue Evaluation**
   
   Category: `bug` | Status: **Partially Resolved — Regression Detected**
   
   The reported issue (missing cluster-scoped duplicate check in mock 
`createTopic()`) was fixed in commit c4c2d96e (2026-08-04), which added the 
correct `clusterId`-scoped check:
   
   ```typescript
   const duplicate = mockTopics.some(
     (topic) => topic.name === data.name && topic.clusterId === data.clusterId,
   );
   ```
   
   However, commit 987b748e (2026-09-16) **regressed** this check to a global 
name-only comparison:
   
   ```typescript
   const duplicate = mockTopics.some((topic) => topic.name === data.name);
   ```
   
   **Current behavior:** Duplicate names are rejected across *all* clusters, 
not just within the same cluster. This is overly restrictive — it prevents 
creating topics with the same name in different clusters, which should be 
allowed.
   
   **Root cause:** The `clusterId` condition was dropped during a refactor.
   
   **Suggested fix:** Restore the cluster-scoped check:
   ```typescript
   const duplicate = mockTopics.some(
     (topic) => topic.name === data.name && topic.clusterId === data.clusterId,
   );
   ```
   
   ---
   *Automated evaluation by RockteMQ-AI*


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