You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
retention: opt-in pruning for inactive_nodes, node_changes, ping_triggers and soft-deleted observers #329
Some tables are never pruned today, so an operator cannot honour a fixed retention period for node and observer data:
Table
Today
inactive_nodes
Nodes move here after nodeDays; there is no DELETE.
node_changes
Permanent history of name/role/position changes.
ping_triggers
Holds sender names. Not covered by the transmission prune batches (maintenance.go); the only DELETE is a hash-migrate dedupe.
observers
Rows past observerDays are only soft-deleted.
Proposal
Add opt-in retention knobs in retention, for example inactiveNodeDays, nodeChangeDays, pingTriggerDays and observerPurgeDays. When unset, behaviour stays as today (upstream-compatible).
Run the deletes in the ingestor's existing daily prune and at startup, in batches inside WriterTx, like pruneBatches.
ping_triggers should follow the transmission prune (delete triggers whose transmission is gone, or apply its own age).
Log the counts, the same way the existing [prune] lines do.
Acceptance
For each knob, a test that is red on master and green after: old rows are removed, recent rows are kept, and an unset knob changes nothing.
No regression in the Ping Scores history: entries already marked data_pruned must still render.
Implementation note: #34 is a port of upstream#1886 (opt-in observerPurgeDays hard-delete). Use it as the basis for the observers part, rebased onto current master. Close #34 when this lands.
Scope change (operator decision 2026-10-07): ping_triggers is excluded from this issue. It must keep its rows indefinitely, because Ping Scores all-time records join it with the history sidecar (see #349 / #241). Only inactive_nodes, node_changes and soft-deleted observers get opt-in retention here.
Activity
dborup commentedon Oct 7, 2026
Implementation note: #34 is a port of upstream#1886 (opt-in
observerPurgeDayshard-delete). Use it as the basis for the observers part, rebased onto current master. Close #34 when this lands.dborup commentedon Oct 7, 2026
Scope change (operator decision 2026-10-07):
ping_triggersis excluded from this issue. It must keep its rows indefinitely, because Ping Scores all-time records join it with the history sidecar (see #349 / #241). Onlyinactive_nodes,node_changesand soft-deleted observers get opt-in retention here.test(ingestor): lock ping_triggers out of the table retention (#329)
fix(ingestor): drop the pingTriggerDays knob; ping_triggers is kept (#…
Merge pull request #350 from dborup/codex/issue-329-retention-never-p…
dborup commentedon Oct 7, 2026
Fixed by #350 (merged as
987c220d3ffbb6c89cf02f325a22ad628ffa9b14).