Repository navigation
Run the clock while a learner waits for a state write - #2227
Merged
Merged
Conversation
TestR26R27C30OpenLearnerIdleAndStateWake froze its fake clock after the idle count, then waited for learner a to apply the next write. A learner's transport lane holds two messages. When it is full, the message carrying the new commit is dropped and raft counts it as sent, so only the next heartbeat delivers it. With no tick, no heartbeat came, and the wait ran out at 30 s. Advance the clock at its real rate from the write on. The idle count and every assertion are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
What fails
TestR26R27C30OpenLearnerIdleAndStateWakefails withR9 learner did not reach its applied stateafter 30 s when the machine is busy. #2224 fixes one cause (the group going back to sleep right after a write). This is the second cause; it needs no product change.Cause
laneSlots,MaxInflight / 4). When the lane is full, the message is dropped withErrCapacity.In real use the clock runs, so the learner catches up at the next heartbeat, at most 5 s later.
Change
The test advances the clock at its real rate from the write onward. The idle count and all assertions are unchanged, and no timeout changed.
Evidence
MsgAppafter the write, the old test fails with the same line, and the new test passes in about 9 s.🤖 Generated with Claude Code