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

   **Correction to evaluation above** (formatting was lost due to shell 
escaping):
   
   **Root Cause:** `TencentAclService.isLastRolePage()` (line 203) uses `||` to 
combine two termination conditions:
   
   ```java
   return returned < PAGE_SIZE || totalCount != null && totalCount >= 0L && 
fetched >= totalCount;
   ```
   
   When the API returns a short page (`returned < PAGE_SIZE`), pagination stops 
immediately **without reconciling against `TotalCount`**. The same early-exit 
pattern exists in the `data.length == 0` guard at the top of each loop (lines 
73, 97, 179), which also breaks without consulting `TotalCount`.
   
   **Impact:**
   - `listUsers` / `listRules` can silently return a partial ACL inventory
   - `findRole` (used by `updateUser` to preserve existing permissions) throws 
a misleading 404 instead of surfacing the upstream data inconsistency
   - Operators are directed toward the wrong diagnosis when the real cause is a 
transient Tencent API short-page response
   
   **Severity:** Medium — data integrity risk in ACL management; no 
message-path impact
   
   **Affected paths:** `listUsers`, `listRules`, `findRole` in 
`TencentAclService.java`
   
   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]

Reply via email to