6.4.7 - Live DVR retains the window it advertises
A live session kept about 40 s of rewind history no matter how large a DVR window it was asked for, while the playlist and the published seekable range advertised the whole thing.
Fixed
-
A live DVR rewind deeper than roughly 40 s no longer asks for a segment the cache has already deleted. Live resolved a segment retention budget of 0, documented as "window-only pruning; the sliding playlist already dropped everything behind the window, so retention would serve nothing". That has it backwards. The playlist window is the looser bound (
windowSegmentCount, 300 segments for a 600 s DVR window at a 2 s cadence).pruneOutsideWindowis the tighter one, and with a 0 budget it takes its hard-window branch and cuts atcurrentTargetIndex - backwardWindow, i.e. 20 segments.A live session therefore retained ~42 s regardless of
dvrWindowSeconds, while the playlist andliveSeekableRangeadvertised the full window. A rewind past that asked for a segmentevictBelowhad deleted, and live has norestartHandlerto re-produce it, so the fetch burned its timeout and returned nothing. It also broke the invariantLiveWindowSizingstates about itself: that playlistfirstVisibleand cache eviction read one source of truth "so they can never drift".Live now resolves the same volume-aware budget as VOD (2 GiB, clamped to a quarter of free space), which is the mechanism built for precisely this case (#93: "a backward seek into watched content").
backwardWindowkeeps its own documented job as the Continuous-Audio handover floor, and remains the part never traded away for history.Measured with
aetherctl live --dvr-window 600 --fast-zap --realtime --preroll 0: before,cacheCountpinned at 21 for the whole 150 s session at a ~31 MB plateau; after, it tracks production (15, 30, 45, 60, 75) up to 113 MB. Bounded rather than unbounded: the same run at--dvr-window 60grows to 30 segments, exactlywindowSegmentCount, and holds there.
Compatibility
No public API change. VOD behaviour is unchanged: it already resolved this budget. The internal helper vodRetentionBudgetBytes is now sessionRetentionBudgetBytes, since it is no longer VOD-only.
Worth knowing for hosts that set a large dvrWindowSeconds on live: a live session now keeps up to that much history on disk, bounded by the retention budget, where it previously kept about 40 s. At 6 Mbps a 600 s window is roughly 450 MB; the 2 GiB cap covers 600 s up to about 28 Mbps, and the quarter-of-free-space clamp protects a nearly full volume. The producer-side prefetch park this budget also feeds is VOD-only as of 6.4.6, so live cannot park on it.
Upgrading
.package(url: "https://github.com/superuser404notfound/AetherEngine", from: "6.4.7")