RockteMQ-AI commented on issue #1235: URL: https://github.com/apache/rocketmq-dashboard/issues/1235#issuecomment-5215151300
**Issue Evaluation** Category: `bug` | Status: **Confirmed** The reported issue has been verified against the current codebase on the `rocketmq-studio` branch. **Root Cause:** `InstanceService.deleteInstance()` (line 200-216) checks `existing.getTopicCount()` and `existing.getConsumerGroupCount()` from the persisted entity. These values are only populated during instance listing and can be stale (zero) when delete is called directly. A race condition or stale cache can allow deletion of an instance that still owns topics/consumer groups. **Impact:** Data integrity risk — an instance with active resources could be deleted, orphaning topic and consumer group metadata. This is especially dangerous in automated workflows where listing and deletion happen in separate requests. **Severity:** high **Affected files:** - `InstanceService.java:200-216` — `deleteInstance()` uses stale cached counts - `InstanceService.java:207-213` — resource check reads from entity, not live data An automated fix proposal can be generated. Reply `/approve` to proceed with PR generation. --- *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]
