Conversation
Several writes on one branch publish in one __manifest compare-and-swap as one graph commit. A per-branch publisher admits queued entries by footprint, composes same-table strict inserts by key into one detached commit, and publishes through the unchanged single-commit publisher. Motivated by the same-branch ceiling measured for the shared schema gate (#783) and by #784.
Footprints include execution reads (write skew through zero-match scans); edge non-key @unique is exclusive; the materialized and effective heads are distinct; the rollback is cap one plus horizon zero; the retry contract is stated as it is; the append-only class covers insertion-only upserts, which is how the benchmark's keyed inserts are staged; carrying exact ids is a prerequisite.
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.
Draft RFC for step 3 of RFC 0067's throughput path: several writes on one branch publish in one
__manifestcompare-and-swap. Docs only.Why
PR #783 measured the same-branch ceiling with
concurrent-writeson the local filesystem and on RustFS at +30 ms per round trip:What it decides
A batch is one graph commit. RFC 0067 sketched N commit rows per publication instead. A code survey of
mainplus engine: shared schema gate and the write critical section (RFC 2026-09-18) #783 found that every mapping from a commit to its__manifestversion assumes one commit per version: snapshot reads, diffs, the change feed's head check and one-transaction proof, merge bases and collector roots throughpinned_graph_commit, parent resolution, head rows incommit::overwrite, the lost-ack read-back, andExactGraphHead. One commit per batch changes none of them, and needs no change to the storage format, the wire or the API.Same-table inserts compose by key. Every benchmark writer inserts into one table, so batching only writes to different tables would batch nothing.
insertinto the@keytypeChunkis staged as an upsert. So composition covers strict inserts and upserts whose staged transaction only appends, meaning no key matched.Detached commits happen after admission and are stamped with the batch's head. RFC 0067's sketch had writers commit before submitting. The collector's staging rule would then sweep an admitted entry whose captured head had fallen behind. Committing after admission leaves that rule unchanged.
Admission. An entry is admitted when:
The footprint is its written tables, every table its execution opened (including a predicate scan that matched nothing), and the tables its validation read. For append-only entries the rule is relaxed to disjoint inserted ids. The batch is conflict-serializable in admission order.
Scope.
Review
An independent Codex review of the first draft found two ways the admission rule was unsound, plus five further gaps. All were verified against the code and fixed in
970f3f68:@unique;The RFC's decision log lists each one.
Checks
check-docs.py,typosandcheck-agents-md.shpass. The RFC 0067 edit adds a pointer in its Unresolved questions, away from the lines #783 changes.