Bump retina-tracker: bounded track history - #314
Conversation
Picks up retina-tracker fix/bounded-track-history, which makes the five `Track.history` buffers deque(maxlen=600) and drops MAX_COMPLETED_TRACKS from 5000 to 50. Both stores are per Tracker, and this server holds one Tracker per node pipeline for days at a time, so the fleet multiplies them by ~60. The history lists were appended on every processed frame on both the update and the coast path with no cap, at a measured 450 B per entry -- 1.55 MiB per track-hour at 1 Hz for any track that never satisfies should_delete. The completed-track archive held 5000 whole retired Tracks with their history attached, a ~149 MiB per-node ceiling reached by ordinary track churn within the hour, and nothing here reads it: get_confirmed_tracks and completed_tracks have zero call sites in the backend. No backend change is needed. Nothing here touches a history attribute directly; the readers go through get_recent_detections, and the deepest of them asks for N2_TRACK_HISTORY_MAX samples, which is 20 against a cap of 600. Its reverse-scan semantics are unchanged, including the skip over the None measurements mark_missed appends -- which is what frame_processor's freshness signal depends on. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Claude finished @jehanazad's task in 2m 3s —— View job Review: Bump retina-tracker: bounded track history
Scope: This PR is a pure submodule pointer bump ( Verified against the backend:
Minor observation (non-blocking): the backend has its own, unrelated No issues found that would block merging. The change looks correctly scoped and the "no backend code change" claim checks out against actual usage sites. |
Summary
Submodule bump of
libs/retina-trackertod172e3e(offworldlabs/retina-tracker#25, merged): per-track history buffers become bounded ring buffers (TRACK_HISTORY_MAX = 600) and the never-readcompleted_tracksarchive shrinks from 5000 to 50 tracks per node.Why
A robustness audit of the long-running server found these two stores as the only sustained-growth and largest never-read plateau in the process:
Track.historygrew ~1.5 MiB per track-hour with no cap, andcompleted_tracksheld up to 149 MiB of deadTrackobjects per node pipeline that nothing in the backend reads. Live RSS on the test droplet climbs ~8 MB/min for the first hour after every restart with no plateau in sight.Server impact
No backend code change. The deepest server reader (
get_recent_detections,N2_TRACK_HISTORY_MAX = 20) is 30× inside the cap. Server test suite run against the new library: 2971 outcomes, 0 failures; pre-commit clean.Post-deploy check
process_rss_mbon/api/admin/metricsshould plateau within the first hour instead of climbing linearly.🤖 Generated with Claude Code