Skip to content

Run the clock while a learner waits for a state write - #2227

Merged
santoshkumarradha merged 4 commits into
app/v3from
fix/c41-learner-tick
Nov 3, 2026
Merged

santoshkumarradha merged 4 commits into
app/v3from
fix/c41-learner-tick

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

What fails

TestR26R27C30OpenLearnerIdleAndStateWake fails with R9 learner did not reach its applied state after 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

  • A learner's transport lane holds 2 messages (laneSlots, MaxInflight / 4). When the lane is full, the message is dropped with ErrCapacity.
  • If the dropped message is the one carrying the new commit, raft still counts it as sent. The acknowledgement then sends no new commit, so only the next heartbeat delivers it.
  • Heartbeats need a tick. The test froze its fake clock after the idle count, so the heartbeat never came.

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

🤖 Generated with Claude Code

santoshkumarradha and others added 4 commits November 2, 2026 13:10
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]>
@santoshkumarradha
santoshkumarradha merged commit a4937f0 into app/v3 Nov 3, 2026
@santoshkumarradha
santoshkumarradha deleted the fix/c41-learner-tick branch November 3, 2026 07:23
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