Repository navigation
fix(studio): a slow thumbnail job keeps a reader that other clips still decode from - #6643
Merged
Merged
Conversation
…ll decode from A job that timed out judged the reader by its own progress only. A poster job that got an already-open reader while a sibling was decoding on it, and took more than its budget to reach its one frame (a slow link, Chrome's six connections held), logged a timeout and retired a healthy reader, so the next clip re-read the index. The pooled reader now counts the frames every job decodes from it, and a timed-out job retires it only when no frame came from it while the job held it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
4 tasks done
…its name, not a comment Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Edit accuracy: accurate 271 (base branch 271), smooth 121 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (3)
|
Contributor
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · debfe5ee
The shared counter is snapshotted after acquire, so only frames decoded while this job held the reader count. The waited-for-open rule and the existing sibling-ends test are unchanged. CI, Comments and PR captures are green on this head. One interaction with #6642 is noted there: keeping the reader alive also keeps its in-flight reads retrying.
— Genesis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #6629, from Genesis's review. A thumbnail job that timed out judged its reader by its own progress only: whether it had waited for the open, or had decoded a frame itself. Take a poster job that got an already-open reader while a sibling clip was decoding on it, and then needed more than its budget to reach its one frame (a slow link, or Chrome's six connections held). It logged a timeout and retired a healthy reader, so the next clip re-read the index (at a 3.4 GB offset for a long camera file).
Now the pooled reader counts the frames that every job decodes from it (
progress.framesFromAnyJob). A timed-out job retires the reader only if no frame came from it while that job held it. A job that waited for the open still counts that open as progress, as before.No visible change
The reader's frame count in
thumbnailSourcePool.tsandthumbnailVideoDecoder.ts: 17 lines, no.tsx,.cssor.html. A thumbnail looks the same; a slow clip no longer makes the next one re-read its source.What I measured
thumbnailVideoDecoder.test.ts+thumbnailScheduler.test.ts: 65 pass, including the newkeeps the reader when a clip times out while another clip decodes frames from it.drops a reader for one clip's timeout only once the clip still decoding on it endsstill passes. Its sibling has decoded no frame when the timeout fires, so the reader is still retired.progress = { framesFromAnyJob: 0 }per acquire, the old per-job rule), the new test fails: the timeout is logged and the next clip reopens the source.What I did NOT exercise
mediaFetch.🤖 Generated with Claude Code