Repository navigation
test(durable): pin that a failed checkpoint after a landed Append doesn't wedge the Handle - #267
Merged
Merged
Conversation
…sn't wedge the Handle A step whose Append lands but whose Checkpoint then fails once costs its caller only the checkpoint error: the Record is durable, so the Handle carries on and a Recover rebuilds the live Handle's state and step number. Four regression tests cover every seam that settles a step: Tick (the #241 reproduction), Fire, the RunService settle and DeliverToActor. Each fails one Checkpoint after the step's Append and checks the failed call returns the checkpoint error without ErrHandleFailed, that the next step succeeds, that the journal holds the Record, and that Recovers rebuild the live state and continue at the live Handle's next step. The RunService settle and DeliverToActor pins share one table-driven test and, with the Tick and Fire ones, one failing store: failingCheckpointStore, which TestHandle_FailedCheckpointOnTick_KeepsGoing used, now failing once with a sentinel error the tests match with errors.Is. That superseded test is gone — the new Tick pin makes its assertions — and so is ckptFailStore, which it duplicated. Signed-off-by: Ray Karnes <ray.karnes@stablekernel.com>
Contributor
Author
Review findingsThe AI reviewers' pass over this change checked every review label and found no blockers. Three non-blockers were real, and all three are fixed in this commit:
|
joshua-temple
approved these changes
Nov 23, 2026
2 tasks done
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 this does
#241 reported that a step whose
Appendlanded but whoseCheckpointthen failed left the Handle stuck: every later step hitErrStepConflicton the reused step number. #243 (9ea0ded) already fixed that.recordStepnow advances the step number as soon as the Append lands, and a failed checkpoint is returned to the caller without failing the Handle. This PR changes no behavior. It pins that fix so it can't quietly come back.Tests
durable/checkpoint_failure_test.gomakes one Checkpoint fail after a landed Append, at each entry seam that records a step:TestTickCheckpointFailsOnceAfterLandedAppend_HandleCarriesOn, the reproduction from bug: durable: a failed checkpoint after a landed Append leaves the Handle stuck on ErrStepConflict #241;TestFireCheckpointFailsOnceAfterLandedAppend_HandleCarriesOn;TestSeamCheckpointFailsOnceAfterLandedAppend_HandleCarriesOn, for theRunServicesettle andDeliverToActor.Each test checks four things:
ErrHandleFailed;Recovermatches the live Handle's snapshot and records at its next step number.Making any one seam fail the Handle on a checkpoint error fails only that seam's test.
TestHandle_FailedCheckpointOnTick_KeepsGoingis removed, because the new Tick test makes all of its assertions. Its test Store,failingCheckpointStore, moves next to the new tests and gains a sentinel error, so all four tests share it.Checks
mage checkpasses in every module (go1.27.4)Closes #241