yyqdbngt opened a new pull request, #5880: URL: https://github.com/apache/rocketmq-dashboard/pull/5880
## Why `AclService.listRules` pages Tencent instances in memory: it fetches the full remote rule list, filters it, then slices page/pageSize out of whatever order the cloud API happened to return. That order is not stable across calls, so consecutive page requests can place the same rule on two pages (duplicate rows in the UI) or skip a rule entirely (invisible rule that only ACL-checked clients hit). Both sibling paths already guarantee deterministic order before slicing: the Apache path gets `ORDER BY` from the database, and the Tencent branch of `pageUsers` explicitly sorts (`gmtCreate` desc, id) before its sublist. Only the Tencent rule path lacked it. ## What changed - The Tencent rule branch now sorts by principal (then resource, nulls last) after filtering and before slicing, so each rule lands on exactly one page. ## Validation - Red first: new test `listRulesShouldPageTencentRulesWithStableOrderingTest` mocks the remote list returning a different permutation per call; before the fix page 2 returned `role-a` again (and `role-c` was unreachable), after the fix pages 1-2 cover all three rules exactly once. - `mvn test -Dtest=AclServiceTest,AclControllerTest` — all green. -- 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]
