Skip to content

fix(dvr): start a recording's write rate watch from the channel's best window - #624

Merged
jamesarich merged 1 commit into
mainfrom
fix/rate-per-channel
Oct 31, 2026
Merged

jamesarich merged 1 commit into
mainfrom
fix/rate-per-channel

Conversation

@jamesarich

Copy link
Copy Markdown
Owner

The rate watchdog (#622, #623) kept 73% of a 20-minute window in its first clean run on the live server and 56% in the repeat (10-31, VH1). In the repeat, the recording's first read ran 8.9 minutes at 80 KB/s on a 326 KB/s stream and ended on its own: a first read slow from its first byte has no earlier window in its own recording to show it up. The recorder now remembers each channel's best write window while the server runs and starts the channel's next recording from it (WriteRate(initialPeak = ...)).

Limits: the memory is lost on restart, so a channel's first recording after one is unprotected for its first read; and a stream whose bitrate legitimately drops to under a third of an earlier recording's best would be reopened once. Four runs so far read 61%, 65%, 73% and 56%, so the gain needs repeating at other hours before it counts as a rate.

Testing Performed: new WriteRateTest case (80 KB/s from the start is slowed against a remembered 326 KB/s window, and is not with no history); spotlessCheck detekt, WriteRateTest and RecorderLapseTest pass locally.

…t window

The rate watchdog's clean runs on 10-31 kept 73% and then 56% of a 20 minute window: in the second, the recording's
first read ran 8.9 minutes at 80 KB/s on a 326 KB/s stream, and a first read slow from its first byte has no earlier
window in its own recording to show it up. The recorder now remembers each channel's best window while the server
runs and starts the channel's next recording from it. A recording of a channel the server has not recorded since it
started is unprotected for its first read.
@jamesarich
jamesarich merged commit 502157a into main Oct 31, 2026
6 checks passed
@jamesarich
jamesarich deleted the fix/rate-per-channel branch October 31, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant