john120283 f065cc8642
fix unbounded recordings_info growth for cameras with no cache segments (#23528)
A record-enabled camera whose record stream produces no cache segments
never appears in grouped_recordings, so the per-camera prune in
RecordingMaintainer.move_files() never runs for it. Its
object_recordings_info and audio_recordings_info buffers then grow
without bound until the recording process is OOM-killed (discussion
#23451).

Run a prune every move_files() cycle for cameras absent from
grouped_recordings, dropping entries older than the longest a segment
could still wait in cache before being matched
(MAX_SEGMENTS_IN_CACHE * MAX_SEGMENT_DURATION * 2). Cameras present in
grouped_recordings are left untouched and keep their existing prune.

Add a regression test asserting that an absent camera's stale entries
are dropped (recent ones kept) while a present camera's entries are
left intact.

Co-authored-by: John Pescatore <johnpescatore@claude.internal.johnpescatore.com>
2026-06-22 14:33:56 -06:00
..
2026-05-22 08:39:52 -06:00
2026-06-16 08:56:52 -05:00
2026-03-26 12:54:12 -06:00
2026-06-04 12:48:58 -06:00
2026-05-21 08:12:53 -06:00
2026-05-29 06:53:17 -06:00
2026-06-01 12:08:46 -05:00
2026-05-27 09:19:11 -06:00
2026-05-30 21:35:03 -06:00
2026-05-27 09:19:11 -06:00
2026-02-03 13:29:52 -06:00
2026-03-26 12:54:12 -06:00
2026-04-29 16:20:19 -06:00