Problem/Motivation

Each cron invocation currently removes at most 250 expired history rows. At higher intake rates the backlog can grow faster than ordinary cron removes it, a limitation already documented in the README.

Proposed resolution

Add a bounded maintenance command or configurable time/row budget that can drain several cleanup batches, plus backlog/oldest-expired visibility. Keep conservative defaults and durable suppression/audit protections.

Acceptance criteria

  • Measure representative workloads before changing indexes or batch sizes and publish throughput assumptions.
  • Bound wall time and row count, resume safely after interruption and handle overlapping cron/CLI execution.
  • Delete only eligible event history; preserve suppression evidence, release markers and separately retained operator audits.
  • Report approximate or bounded-cost backlog measurements without expensive unbounded scans on every request.
  • Test more than one batch, zero retention, exact expiry boundaries and concurrent intake across the verified database drivers.

Scope and dependencies

Optional follow-up after stable release; not a blocker for #3621224: Complete the 1.0.0 stable release verification gates. Builds on #3621134: Bound cron cleanup and index normalized suppression lookups; the completed original issue remains fixed.

Comments

jmcerda created an issue. See original summary.

  • jmcerda committed 3ec8b106 on 1.x
    Issue #3621235: Say retention batches delete at most 250 rows
    

  • jmcerda committed 6f1dd196 on 1.x
    Issue #3621235: Add configurable bounded retention draining and backlog...
jmcerda’s picture

Assigned: Unassigned » jmcerda
Status: Active » Fixed

Landed on 1.x-dev. Cron still defaults to one 250-row batch. Operators can raise event_retention_batches, set a wall-time budget, or run drush postmark-webhooks:retention-drain. Overlapping cron and CLI share a lock. Health reports oldest expired receipt time via an indexed one-row probe. Durable suppression and operator audits are not deleted. Throughput assumptions remain in docs/retention-benchmark.md. This is not a stable-release gate.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.