fix(delivery): fire a hold that lost the race to its settle; skip held in start sweeps (RIG-4031) - #1351
Draft
rigel-mintaka wants to merge 3 commits into
Conversation
…d in start sweeps (RIG-4031) The fabric callback runs concurrently with the settle drain. A message held after its author settled waited for the next settle, unbounded for an author that stays READY. OnSessionSettled now records a per-session settle time, and hold delivers at once from stored blocks when that settle is at or after the message commit time. Entries are pruned by the recovery pass and dropped on reap. The session-start sweep also skips held messages, so a recipient that starts mid-turn gets the settled blocks from fireHeld instead of a partial deliver that dedup would keep. Spec-impact: none. Refs RIG-4031, RIG-3107 Co-authored-by: Matt Wilkinson <matt@rigel.build>
|
Compass engineering docs preview: https://compass-managed-rig-4031-hel.compass-eng-docs.pages.dev Deployed from |
…e by liveness (RIG-4031) Review fixes: - A hold that finds its settle already recorded now appends to c.held and queues a settle edge on the loop, instead of dispatching on the fabric goroutine. fireHeld sends the list in post order, so a late M2 no longer overtakes a held M1. - Sweeps skip only messages held for a live author session, so an entry stranded under a dead session is still delivered by the cursor sweep. - lastSettle is pruned by liveness, not age: settle >= at is correct at any age, and an age prune dropped the guard while a backlog replayed. Spec-impact: none. Refs RIG-4031 Co-authored-by: Matt Wilkinson <matt@rigel.build>
…031) The edge a late hold queues fired the whole held list, including a next-turn message still streaming. Held entries now carry their commit time, and the edge fires only entries at or before the settle it replays; a real settle still fires all. heldIDs reads liveness after the held snapshot, so a race leaves an entry skipped rather than sent partial. Spec-impact: none. Refs RIG-4031 Co-authored-by: Matt Wilkinson <matt@rigel.build>
Contributor
|
Status at b4f5713:
This PR stays a draft with #1345; it is gated on RIG-4014 and RIG-4030. Enqueue at this PR, the stack tip, once promoted. |
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.
This PR is part of a stack containing 6 PRs:
mainThe fabric callback runs concurrently with the settle drain. A message
held after its author settled waited for the next settle, unbounded for
an author that stays READY. OnSessionSettled now records a per-session
settle time, and hold delivers at once from stored blocks when that
settle is at or after the message commit time. Entries are pruned by
the recovery pass and dropped on reap.
The session-start sweep also skips held messages, so a recipient that
starts mid-turn gets the settled blocks from fireHeld instead of a
partial deliver that dedup would keep.
Spec-impact: none. Refs RIG-4031, RIG-3107
Co-authored-by: Matt Wilkinson matt@rigel.build