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

[I] Alert Rules inventory loads every rule before rendering [rocketmq-dashboard]

tju-yxq opened a new issue, #2589:
URL: https://github.com/apache/rocketmq-dashboard/issues/2589

   ## Problem
   
   The Alert Rules page currently fetches every rule in one request:
   
   ```java
   public List<AlertRuleVO> listRules() {
       return alertRepository.findAllRules();
   }
   ```
   
   The page then renders the full list with `pagination={false}` and has no name search or enabled-state filter. Two mutation paths also read the complete inventory:
   
   - `toggleRule` scans every rule to locate one ID;
   - `bulkToggleRules` scans every rule to resolve a small ID list.
   
   This means a page that displays 20 rules still materializes and transfers the full rule inventory, and each toggle performs an O(total rules) repository read.
   
   ## Expected behavior
   
   - Add a backward-compatible `GET /api/alert-rules/page` endpoint.
   - Support name search, enabled filter, bounded page, and page size.
   - Apply filtering and stable ordering (`name ASC, id ASC`) in SQL.
   - Return the existing `items / total / page / size` contract.
   - Reject invalid page/pageSize before repository access.
   - Switch the Alert Rules page to server-driven pagination and filters.
   - Use a direct ID lookup for toggling one rule.
   - Resolve bulk-toggle IDs with an ID-bounded query.
   - Keep the unpaginated endpoint for export and existing callers.
   
   ## Verification scope
   
   Tests should cover repository SQL filters/ordering/pagination, service normalization and validation, HTTP parameter passing, and page filtering/pagination behavior.


-- 
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] Alert Rules inventory loads every rule before rendering [rocketmq-dashboard]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #2589:
URL: https://github.com/apache/rocketmq-dashboard/issues/2589#issuecomment-5413232726

   **Issue Evaluation**
   
   Category: `enhancement` | Status: **Evaluated**
   
   **Feasibility:** Feasible
   **Scope:** `server/src/main/java/.../ops/alert/` (AlertService, AlertRepository), `web/src/pages/ops/alerts.tsx`
   **Compatibility:** Backward-compatible — the existing unpaginated endpoint remains for export and current callers.
   
   The assessment confirms the problem: `AlertService.listRules()` calls `alertRepository.findAllRules()` which materializes the full inventory. The frontend renders with `pagination={false}` and both `toggleRule` and `bulkToggleRules` scan the complete list.
   
   Adding a `GET /api/alert-rules/page` endpoint with server-side name search, enabled-state filter, bounded pagination, and stable ordering (`name ASC, id ASC`) is straightforward. The existing `items / total / page / size` contract can be reused from other paginated endpoints in the project.
   
   ---
   *Automated evaluation by github-manager-bot*


-- 
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] Alert Rules inventory loads every rule before rendering [rocketmq-dashboard]

Posted by "tju-yxq (via GitHub)" <gi...@apache.org>.
tju-yxq commented on issue #2589:
URL: https://github.com/apache/rocketmq-dashboard/issues/2589#issuecomment-5445562563

   Alert-rule pagination was accepted through merged batch PR #2581 (merge commit 6202e6f). The current rocketmq-studio branch contains the bounded server-side inventory path. Closing this issue as completed; PR #2590 was consolidated rather than independently merged.


-- 
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] Alert Rules inventory loads every rule before rendering [rocketmq-dashboard]

Posted by "tju-yxq (via GitHub)" <gi...@apache.org>.
tju-yxq closed issue #2589: Alert Rules inventory loads every rule before rendering
URL: https://github.com/apache/rocketmq-dashboard/issues/2589


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