perf: limit indexed cleanup task batches (#1107)

Limit mail, sent-mail, and indexed address cleanup to configurable batches. Includes E2E coverage and documentation.
This commit is contained in:
Dream Hunter
2026-08-09 23:32:05 +08:00
committed by GitHub
parent a09ede8944
commit 12152fc893
9 changed files with 140 additions and 6 deletions
+3
View File
@@ -18,9 +18,12 @@
- feat: |User| Add server-side pagination for bound addresses, with totals queried only on the first page; validate user-mail list ownership with a JOIN and delete ownership with `EXISTS` instead of loading every bound address for large users (issue #1103)
- feat: |Worker| Process mail, sent-mail, and creation/activity-based address cleanup in batches of 3000 by default, configurable through `CLEANUP_BATCH_SIZE` up to 5000, reducing per-run scans and deletes (issue #1103)
### Testing
- fix: |E2E| Add regression coverage ensuring user settings do not rewrite recent address activity timestamps
- fix: |E2E| Cover cleanup batch limits, continuation on later runs, preservation of recent data, and address-related data cleanup
## v1.10.0