Repository navigation
Community: bound receipt re-sends and earlier-post requests - #599
Merged
Merged
Conversation
Four tests drive the conditions that leave a live batch unacknowledged and record how many acceptance receipts leave the Home in each 500 ms cycle. The Carrier replays the same range until the Home acknowledges it, so every cycle re-ingests the frames the Home already accepted and gossips their stored receipts again. A fifth test measures what each gossip message costs on the wire.
The Carrier replays a batch range until the Home acknowledges it. A Home that cannot acknowledge, because its intake is full or because the acknowledgement itself fails, read that range again every 500 ms and gossiped the stored acceptance receipt of every frame in it again. The driver now counts the frames it ingested from the range the Carrier holds and resumes at the first frame it has not ingested. A receipt that reaches no gossip neighbour also leaves the frame ingested: the acceptance is durable, and each sender re-sends its own frame until a receipt reaches it, which arrives at a new Carrier position and earns a fresh receipt. Nothing a Home sends changes shape, and replay protection is untouched: a frame skipped here is one this Home already accepted and recorded.
A shown Home asked up to four present Homes for their whole retained history every 15 s for as long as it ran. The request and reply formats stay as they are; what changes is when a Home sends one. HistoryCadence makes a pass due at once on a Community join, on a Community connection that returns, and on a Home that is present now and was absent at the last pass. A pass that none of those asked for waits twice as long as the one before it, up to 15 minutes. Ten minutes of Runtime checks now carry six passes instead of forty.
Each test states the behaviour a person needs. Four of them fail at 9b9b283 and the rest hold the limits the round-1 change keeps. - A reused consumer cursor skips its first frames, so a reconstructed topic loses a post and its receipt. - A receipt that reached nobody is never sent again, so a delivered post stays unconfirmed and its sender re-sends until expiry. - The history worker keeps its grown wait through a leave and a join. - The history cadence test counted its own iterator instead of the requests the Runtime made.
The reused-cursor test now reports the missing receipt instead of the reply its skipped send left behind, and the two cadence measurements stand as their own tests. Co-authored-by: Cursor <cursoragent@cursor.com>
A Carrier position belongs to a topic buffer, and a leave and a join recreate that buffer from position 0. The record now names each ingested frame by its digest and holds one batch, so a frame at a position an earlier batch used is ingested and receipted. The acknowledged range drops the record, because the Carrier never replays it. Co-authored-by: Cursor <cursoragent@cursor.com>
…expires A receipt that reached nobody left the sender with a delivered post it believed was unsent, so it re-sent the post to the whole topic until the post expired. The receipt now waits in its own queue: 5, 10, 20, 40 and then 60 s between sends, at most 32 posts and 1 MiB of frames, at most four sends in one live cycle, and no send after the post expires. A receipt a neighbour took leaves the queue at once. Co-authored-by: Cursor <cursoragent@cursor.com>
A person who left Community and joined it again kept the grown wait, so the Runtime could wait a quarter of an hour before it asked for the posts of the time away. The worker now reads the membership change itself, both before a check and while a check runs, and both paths use the one reset the service owns. Co-authored-by: Cursor <cursoragent@cursor.com>
A pass that reached nobody doubled the wait towards a quarter of an hour, so a person could wait that long for the posts a returning Home holds. Only a pass another Home answered grows the wait now; an unanswered pass stops at a minute, the silence the Community link already treats as normal. Every check samples the Homes it sees and the person reading Community, so a Home that lapses and returns between two passes asks again, and a person who opens Community asks at the next check. The Home page heartbeat carries that signal on the presence port History already reads, so nothing new travels between Homes. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
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.
Deepen notes
297b5989e(collaboration_transport.rsprocess_incoming_onceandingest_frame,collaboration_history.rs, the Carrier peek and acknowledge paths), issue Community: chat posts can still fill a Home's 4096-entry intake table (spam can stop Community for hours) #409 for the replay and Undo constraints, and the review reports of each round.What changes
Evidence at
54fb9a109Reviews
codex-review.sh): FAIL at9b9b283c0with four findings, then FAIL atb12943274with one finding and the other three confirmed fixed.54fb9a10964a819c32c20bd10dedea04c9bdc0f2, treeee69fff39b52e2ec8b125bf97cef117f28252192. Transport production code is byte-identical betweenb12943274and this head.Not tested
Follow-ups (not blocking, from the reviews)
Refs #409.