Repository navigation
feat(6o-i): caps=txn1, consecutive group offsets and group headers to capable replicas (PR 3) - #197
Merged
Merged
Conversation
… capable replicas (PR 3) Every node advertises txn1; a replica accepts it whenever offered. An EXEC's frames are replicated with fan_out_group: one stream-lock hold gives them consecutive offsets and, two or more, marks them as a group in the backlog. A replica that accepted txn1 is sent a 24-byte header at offset 0 before a group's first frame (live stream and partial sync); any other replica gets today's stream. The replica buffers a group from its header to its last frame, checking every field (version, kind, count, first offset, declared bytes against a 512 MiB bound, consecutive offsets, no DEDUP member), and applies or acknowledges nothing of it before then: a link that ends inside a group resumes before it, and a malformed group is a protocol error, which forces a full synchronization. Members are then applied in order, as frames are today; atomic application is PR 4. Design: benchmarks/v0.6.0/6o-i/V0.6O-I-PROTOCOL-DESIGN.md §6.
…me bound; a resume point remembers its framing mode Review A M4: the replica's group bound is the read-ahead's own (64 MiB, charged at 128 bytes per frame), with an explicit 524,288-frame bound checked from the header. L5: ReplResume remembers txn1 as it remembers expirylog1, so a resume point taken one frame at a time is never offered to a grouped stream. The capability strings the 6O-H tests pin now end in txn1; the fake primary's sends are best-effort, since a replica that refused a frame may already have closed the link.
…ocol error The assembler's next offset and a header's last offset are checked: an overflow ends the link with InvalidData (a full sync) instead of panicking the replication task or accepting an offset twice.
This was referenced Nov 26, 2026
…he test ends follow_reconnecting returns a guard that stops its loop when dropped. A loop that outlived its test could reconnect to whatever later bound its primary's port, such as another test's fake primary.
… taken in (kills mutant M10)
akosidencio
marked this pull request as ready for review
November 26, 2026 14:03
Member
Author
|
Review D (replication offsets) approved this in round 2: D-2 (offset overflow is a protocol error) and R2-1 (test follow loops stop with their test) are fixed here. The mutant M10 is now killed by |
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.
Phase 6O-I, PR 3: transaction groups on the replication stream (
caps=txn1). This implements the approved design (#195, §6–§7).Draft until its independent review approves it. It must not ship in a release without PR 4 (atomic replica apply, review A R2-L1). Until PR 4, a replica applies a received group's members one by one, exactly as it applies frames today.
Changes
txn1, and a replica accepts it whenever it is offered. It is never inferred from a version, and older replicas ignore the token.fan_out_groupreplicates anEXEC's frames under one stream-lock hold, advancing the offset by the count in one step. Two or more frames are marked as a group in the backlog (ReplGroup).txn1is sent a 24-byte header at offset 0 before a group's first frame, on the live stream and in partial syncs. Any other replica gets today's stream.ReplResumerememberstxn1as it remembersexpirylog1.Tests
tests/replication_framing_6oi.rs:txn1;expirylog1×txn1combinations converging.The 6O-H tests that pin the advertised capability string are updated.