Aias00 opened a new issue, #1124:
URL: https://github.com/apache/rocketmq-dashboard/issues/1124

   ## Problem
   
   Deleting a managed instance removes only the `rmq_instance` row. Persisted 
Topic and Consumer Group records retain the deleted `instance_id`; the schema 
has indexes but no foreign keys or cascade behavior. Those stale records are no 
longer reachable through an instance route but can still occupy the 
cluster/name uniqueness constraints.
   
   ## Evidence
   
   - `InstanceService.deleteInstance` calls only 
`instanceRepository.deleteById`.
   - `rmq_topic.instance_id` and `rmq_group.instance_id` reference instances by 
convention, without a database foreign key.
   - `MybatisPlusInstanceRepository.findById` already reports the associated 
topic and consumer-group counts.
   
   ## Expected behavior
   
   Deletion must preserve metadata integrity. The initial safe behavior is to 
reject deletion with a clear conflict response when an instance still owns 
managed Topics or Consumer Groups; operators can migrate or delete those 
resources first.
   
   ## Acceptance criteria
   
   - Deleting an empty instance succeeds.
   - Deleting an instance with managed Topics or Consumer Groups returns a 
structured conflict error and leaves all rows unchanged.
   - Service and controller tests cover both paths.


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