Pulse/pkg
rcourtman 2b8ce06c03 metrics: drain freelist proportionally so metrics.db stops bloating
runRetention reclaimed only PRAGMA incremental_vacuum(5000) (~20MB) and
only when that hourly cycle deleted rows. On instances where an hourly
retention pass frees more than 5000 pages, the freelist grows net-positive
every cycle and the sqlite file bloats unboundedly (5GB+ of free pages over
~60MB of live data) even though row retention works. This is the documented
'50+ resources -> 5GB+' symptom the 5000-page batch was meant to fix.

Reclaim every cycle (so a pre-existing backlog drains even in a no-delete
hour) and size each reclaim to the current freelist, capped at 50000 pages
(~200MB) so a large backlog drains over several cycles without holding the
write lock for minutes. Skip the checkpoint when the freelist is empty so
steady-state WAL cadence is unchanged.

Surfaced by the demo server (pulse-relay): metrics.db had grown to 5.9GB
(5GB freelist), filling its 25GB disk and breaking the nightly backup.

Adds TestStoreRetentionReclaimsFreePages to the perf-and-scalability proof
set and documents the reclaim invariant in the subsystem contract.
2026-06-05 13:29:48 +01:00
..
agents fix(disks): report authoritative disk size and namespace devpath from the host agent 2026-05-29 19:55:53 +01:00
aicontracts Make Patrol reasoning model-owned 2026-05-15 12:22:52 +01:00
audit Harden audit log store failures 2026-05-28 13:44:20 +01:00
auth Split audit log access into dedicated token scope 2026-04-22 07:59:12 +01:00
cloudauth fix(hosted): preserve direct handoff membership continuity 2026-03-26 23:40:02 +00:00
db feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
discovery Pin discovery HTTP probes to captured TLS peers 2026-03-29 19:32:56 +01:00
extensions Restore commercial monitored-system admission hook contract 2026-05-06 18:04:59 +01:00
fsfilters Improve Machines disk summaries 2026-06-03 11:09:58 +01:00
licensing Remove 198 unreachable Go functions 2026-06-03 12:29:37 +01:00
metrics metrics: drain freelist proportionally so metrics.db stops bloating 2026-06-05 13:29:48 +01:00
pbs Fix PBS job task history filters 2026-05-13 17:09:45 +01:00
pmg Harden outbound URLs and file-backed storage 2026-03-29 12:47:55 +01:00
proxmox Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
pulsecli Remove 198 unreachable Go functions 2026-06-03 12:29:37 +01:00
reporting Add entitlement-gated report branding 2026-06-02 18:11:25 +01:00
securityutil Allow insecure dev HTTP agent runtime URLs 2026-04-23 13:48:54 +01:00
server Add optional dedicated agent-ingest listener (PULSE_AGENT_INGEST_PORT) 2026-05-28 22:55:38 +01:00
tlsutil Fail closed on auth env hashing and TLS floors 2026-04-22 05:53:02 +01:00