You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/07 08:33:24 UTC

[I] [Studio][Bug] Check current managed resources before deleting an instance [rocketmq-dashboard]

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

   ## Problem
   
   `InstanceService.deleteInstance` checks `topicCount` and `consumerGroupCount` from the persisted `InstanceVO`. Those values are populated only while listing instances, so a direct delete can observe stale zero values and remove an instance that still owns local Topic or Consumer Group metadata.
   
   ## Expected behavior
   
   Before deletion, resolve the current managed-resource counts from the authoritative repository/provider and reject the request with HTTP 409 when either count is non-zero.
   
   ## Scope
   
   Track 1 control-plane instance lifecycle. Keep the change limited to the instance service/repository contract and regression tests.
   
   ## Evidence
   
   - `server/src/main/java/org/apache/rocketmq/studio/instance/InstanceService.java:200`
   - `server/src/main/java/org/apache/rocketmq/studio/instance/InstanceService.java:207`


-- 
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: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Studio][Bug] Check current managed resources before deleting an instance [rocketmq-dashboard]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Studio][Bug] Check current managed resources before deleting an instance [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1235:
URL: https://github.com/apache/rocketmq-dashboard/issues/1235#issuecomment-5299375023

   This issue has been automatically closed because there has been no activity for 7 days. If you believe this issue is still relevant, please reopen it with updated information.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Studio][Bug] Check current managed resources before deleting an instance [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #1235: [Studio][Bug] Check current managed resources before deleting an instance
URL: https://github.com/apache/rocketmq-dashboard/issues/1235


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org