Repository navigation
1.0.4: wait up to 10 s in init for an idle mirror's first grain - #22
Merged
Merged
Conversation
The replication of a mirror without demand can take more than 1 s for its first grain. The preroll now waits up to 10 s in state init (preroll_no_grain_yet once after 1 s, preroll_first_grain when it comes) and fails the bring-up only after that (preroll_no_grain). Test: first grain after 2.5 s, no failed bring-up, healthy within 0.5 s, audio in sync. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01St7QwmonpoG9EEEqaLFXLi
…ion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01St7QwmonpoG9EEEqaLFXLi
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.
Problem
Round 4 on small (
d146a4e) passed except on an idle mirror: replication needed more than 1 s for the mirror's first grain. The preroll loggedpreroll_no_grain_yetafter 1000 ms, thenchannel_bringup_failedwith a 500 ms retry, and the output was healthy 0.9 s later.Change
OutputChannel::bringUp(src/channel/output_channel.cpp) now waits for a flow's first grain in stateinit, for up to 10 s:preroll_no_grain_yetonce at info after 1 s, andpreroll_first_grainwithwaited_mswhen the grain arrives.preroll_no_grain, warning) and retry as before.The docs are updated: SPECIFICATION §2.4 Preroll and CHANGELOG 1.0.4.
Tests
New unit test: the first grain arrives 2.5 s after the route.
initand is neverfailed.channel_bringup_failed.preroll_no_grain_yetand onepreroll_first_grainline.No merge, no tag, no release.
🤖 Generated with Claude Code
https://claude.ai/code/session_01St7QwmonpoG9EEEqaLFXLi