unbridled-41 commented on PR #5977:
URL:
https://github.com/apache/rocketmq-dashboard/pull/5977#issuecomment-6091111198
### Follow-up review of this fix: the warning claimed more than the flag can
prove
`truncated` is computed as `deleted >= 500 * 20` — the sweep ending on its
ceiling. That is a *"rows may remain"* signal, not proof: a cluster with
exactly 10,000 expired rows deletes all of them and still gets the flag. The
warning asserted the rows were still there, so in that case the operator is
sent to run a cleanup again for nothing.
Commit `0e7dfd04` aligns the wording with what the flag can prove (first
commit `82f19d77` untouched, no force-push):
- `audit.cleanupTruncated` now reads `…,可能仍有 {days} 天之前的记录…` / `…but older
entries may remain…` instead of stating that they remain;
- the `AuditService` comment (and the twin comment in
`AuditServiceTest.cleanupLogsReportsWhenTheSweepHitItsCeilingTest`) records why
the flag is a possibility and the message has to say so.
The rest of the PR is unchanged: complete sweeps still keep the existing
success wording, and the `deleted` count is still reported.
Verified locally:
```
cd server && mvn -o -B -ntp test
-Dtest='AuditServiceTest,AuditControllerTest'
Tests run: 32, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS
cd web && npx vitest run src/pages/ops/__tests__/AuditPage.test.tsx
Test Files 1 passed (1)
Tests 12 passed (12)
```
`npx tsc -b` and `npx eslint` on the touched files are clean.
Branch `fix/audit-cleanup-truncation`, HEAD `0e7dfd04` (on top of
`82f19d77`).
--
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]