zjncs opened a new pull request, #6701:
URL: https://github.com/apache/rocketmq-dashboard/pull/6701

   ### Which Issue(s) This PR Fixes
   
   Fixes #6700
   
   ### Brief Description
   
   The broker push from #6693 read each account's rules with a single bounded 
page (`findRulePage(principal, ..., 1, MAX_RULES_PER_ACCOUNT)`, 200 rows). 
Nothing caps an account at 200 rules on the write side (the rule API pages at 
up to 100 per call, `createRule` has no per-account limit), so for a larger 
account:
   
   - the rules beyond the first page never reached the broker;
   - `policyCount` reported 200 as if it were the whole account;
   - `skipped` stayed empty — the truncation was invisible, breaking the 
result's own "every account/broker pair reports its own result" contract.
   
   The push now pages through the repository until its own total is covered (an 
empty page ends the loop defensively if the total moves mid-read), so the 
written policy entries and `policyCount` reflect the full account.
   
   Non-goals: no change to `MAX_RULES_PER_ACCOUNT` as the page size, no 
write-side rule cap, and no VO shape change.
   
   ### How Did You Test This Change?
   
   - Red-green: the new test 
`pushAclToBrokerPagesThroughEveryStoredRuleBeyondTheFirstPageTest` failed on 
the unmodified tree @ `8bbe7947` (a mocked repository answering page 1 with 200 
rules and `total=203`: the push reported `policyCount=200` and never asked for 
page 2) and passes after the fix, reporting `policyCount=203` and writing 203 
entries.
   - `mvn test -Dtest=AclServiceTest` — **84/84 pass** (83 pre-existing + 1 
new); checkstyle runs in the build and is clean.
   
   AI assistance was used; the failure was reproduced before changing 
production code.


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