fix: retry catch-up batch fetches instead of panicking on a transient miss - #141
fix: retry catch-up batch fetches instead of panicking on a transient miss#141procdump wants to merge 1 commit into
Conversation
|
Claude finished @procdump's task in 2m 31s —— View job PR Review
SummaryThe fix is correct and well-reasoned. Replacing the 5-attempt cap with an unbounded retry (shutdown-only exit) is the right behaviour for committed subdag batches: the batch cannot be skipped without forking, and the only alternative to waiting is crashing and re-entering the same wall. The extraction of No blocking issues. A few things worth calling out: Medium: No test for
|
… miss A CvvInactive node catching up fetches each committed subdag's batches from peers. When that fetch fails transiently -- a PeerNotConnected while the worker network is still re-meshing right after a mode transition -- the pipeline retried only 5 times (~10s) and then surfaced the error as fatal, panicking the subscriber. The panic tears down the whole epoch task stack; the relaunch re-enters the same catch-up and hits the same wall. The batch is never actually lost: it belongs to a committed subdag, so it is held by peers (and, for a rejoining node, usually on local disk too). The node cannot skip it (skipping a committed subdag forks) and cannot progress without it, so the only correct response to a momentary unavailability is to wait, not to crash. Extract fetch_batches_retrying, which retries is_batch_fetch_error failures with capped backoff until success or shutdown, and route both catch-up sites (the pipelined fetch and the startup missing-header fetch) through it. Logging stays loud for the first few attempts then drops to a throttled heartbeat. Genuine non-transient errors remain fatal; the live CvvActive path is unchanged (its batches are local). Shutdown is the only exit from the retry loop. This is a latent bug present on main too, exposed by a chaos test (bombard an observer, kill a validator) -- should be cherry-picked.
875d7fd to
105c246
Compare
|
Claude finished @procdump's task in 1m 43s —— View job
PR ReviewThe fix is correct and well-reasoned. Replacing the 5-attempt cap with a shutdown-only exit is the right behaviour for committed subdag batches: they cannot be skipped without forking, and crashing re-enters the same wall. The extraction of One thing the previous review got wrong — corrected below. Two issues remain worth addressing. Correction:
|
|
Claude finished @procdump's task in 1m 45s —— View job
PR ReviewThe fix is correct and well-reasoned. Replacing the 5-attempt cap with a shutdown-only exit is the right response for committed subdag batches: they cannot be skipped without forking, crashing just re-enters the same wall, and the batch is never actually lost. The extraction of Two issues remain worth addressing before merge. Medium: No test for
|
The problem
A CvvInactive node catching up fetches each committed subdag's batches from peers.
When that fetch fails transiently — a
PeerNotConnectedwhile the worker network isstill re-meshing right after a mode transition — the pipeline retried only 5 times
(~10s), then surfaced the error as fatal and panicked the subscriber. Because that's
a critical task, the panic tears down the whole epoch task stack; the relaunch
re-enters the same catch-up and hits the same wall.
The batch is never actually lost: it belongs to a committed subdag, so it's held by
peers (and, for a rejoining node, usually on local disk too). The node can't skip it
(skipping a committed subdag forks) and can't progress without it — so the only correct
response to a momentary unavailability is to wait, not to crash. Reproduced by a chaos
test (bombard an observer, kill a validator): the node executed the very same outputs a
minute later from local disk, after a gratuitous crash-and-relaunch.
What's changed
fetch_batches_retrying, which retriesis_batch_fetch_errorfailures withcapped backoff until success or shutdown, and route both catch-up sites (the pipelined
fetch and the startup missing-header fetch) through it.
prolonged outage stays visible without flooding.
batches are local). Shutdown is the only exit from the retry loop.
Follow-up (separate PR): after a retry threshold, escalate to a targeted worker-network
respawn rather than retrying forever — for the case where a wedged worker swarm only
clears on respawn.