unbridled-41 opened a new pull request, #5977:
URL: https://github.com/apache/rocketmq-dashboard/pull/5977

   ### Which Issue(s) This PR Fixes
   Fixes #5976
   ### Problem / Evidence
   ```java
   // AuditService.cleanupLogs (before)
   return auditRepository.deleteBefore(cutoff, CLEANUP_BATCH_SIZE, 
CLEANUP_MAX_BATCHES);
   ```
   ```ts
   // audit.tsx (before)
   await cleanupAuditLogs(cleanupDays);
   message.success(t('audit.cleanupSuccess', { n: cleanupDays }));
   ```
   ```
   AuditPage: discloses a cleanup that hit the per-call cap
   -> FAIL before the change (the success toast is shown)
   ```
   ### Root cause / Fix
   A bounded sweep exposed as an unbounded result, and the count discarded in 
the view. Return `deleted` + `truncated` (a full sweep may have left expired 
rows), thread it through the response and the web client, and warn with the 
real count; a non-truncated cleanup keeps the existing message.
   ### Priority and scoring
   **PRIORITY 47** - impact 16/40 (retention silently not applied, with the 
count dropped on the floor), blast radius 10/20 (any deployment above the cap), 
reproducibility 18/20 (pinned by tests), maintenance value 3/20. 
**FIX_CONFIDENCE 80**.
   ### Tests
   - `cd server && mvn -o -B -ntp test 
-Dtest='AuditServiceTest,AuditControllerTest'` -> `Tests run: 32, Failures: 0, 
Errors: 0` (new ceiling case; the bounded-batch case now asserts 
`truncated=false`; three controller cases updated to the new return type).
   - `cd web && npx vitest run src/pages/ops/__tests__/AuditPage.test.tsx` -> 
`Tests 12 passed` (the new case fails before the change).
   - `npx eslint`, `npx tsc -b` and `checkstyle:check` pass.
   ### Risk
   One extra field and one extra warning path; the non-truncated behaviour is 
unchanged.
   


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