docs: Phase 11.12 — promote concurrent-writes-plan.md to canonical reference (SQLR-22)#132
Merged
Merged
Conversation
…ference (SQLR-22) Closes plan-doc §10.9 (the docs slice). Phase 11 (concurrent writes via MVCC + BEGIN CONCURRENT, SQLR-22) is now shipped end-to-end through 11.12 — every shipped sub-phase had been updating the plan-doc piecemeal; this slice promotes the user-facing surface into one canonical reference and reshuffles cross-refs so callers stop bouncing through the historical design record to find the SQL grammar or the retry-loop shape. New docs: - docs/concurrent-writes.md — canonical user-facing reference: TL;DR, conceptual model (version chains, logical clock, commit validation, snapshot reads), SQL surface (PRAGMA journal_mode + BEGIN CONCURRENT + COMMIT/ROLLBACK rules), embedding API (sibling handles + retry loop + vacuum_mvcc), per-SDK error mapping table, REPL .spawn/.use/ .conns demo, error semantics, durability + recovery (WAL log records, v3 format, clock seeding), limitations, references. New example: - examples/rust/concurrent_writers.rs — registered as `cargo run --example concurrent_writers`. Two sibling Connections via Connection::connect; runs (1) disjoint-row commits both succeed and (2) interleaved same-row commits where one wins and the other catches Busy + retries. Verified end-to-end: alice ends at 100 + 10 + 5 + 50 = 165. Updated cross-refs: - docs/concurrent-writes-plan.md — redirect banner at the top pointing readers to the canonical doc; "Status" line updated to "shipped end- to-end through 11.11a"; plan-doc §10.9 entry annotated with what landed in 11.12. - docs/_index.md — Phase 11 summary refreshed to "shipped end-to-end through 11.11a + 11.12 docs sweep"; new "Concurrent writes" entry in the "Using SQLRite as a library" section. - docs/supported-sql.md — PRAGMA journal_mode and BEGIN CONCURRENT sections gain a "see concurrent-writes.md for the full reference" callout; the "Not yet supported" entry for BEGIN CONCURRENT removed (it ships). - docs/embedding.md — Phase 11.4 section refreshed with a pointer at the canonical doc + the new example; "what's still ahead" turned into "what shipped after 11.4" with 11.5 → 11.11a captured. - docs/roadmap.md — active-frontier blurb expanded to enumerate every shipped sub-phase + the explicitly parked follow-ups; Phase 11.12 entry promoted to ✅ shipped. - docs/design-decisions.md — Phase 11 §12a–§12h gain a leading banner pointing readers at the canonical doc for the user-facing view. - examples/README.md — concurrent_writers entry added alongside quickstart + hybrid-retrieval. Workspace: 615/615 Rust tests still pass; cargo fmt + clippy + doc all clean. The new example builds + runs successfully. What's still open in Phase 11: - 11.10 — Indexes under MVCC (deferred-by-design, plan-doc §10.7) - 11.11b — "N concurrent writers" bench workload + Go SDK cross-pool sibling shape (carved out from the original 11.11) - Checkpoint-drain follow-up (parked half of 11.9 — enables set_journal_mode(Mvcc → Wal) once MvStore can be drained) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
BEGIN CONCURRENT, SQLR-22) is now shipped end-to-end through 11.12 — every shipped sub-phase had been updating the plan-doc piecemeal; this slice promotes the user-facing surface into one canonical reference.examples/rust/concurrent_writers.rs— two siblingConnections, interleavedBEGIN CONCURRENTs, exercising both the disjoint-row happy path and the same-row retry. Verified end-to-end: alice ends at100 + 10 + 5 + 50 = 165._index.md,supported-sql.md,embedding.md,roadmap.md,design-decisions.md, andexamples/README.mdupdated to point at the canonical doc; the plan-doc stays as the historical design record with a redirect banner.New canonical reference:
docs/concurrent-writes.mdCovers the full Phase 11 user-facing surface: version chains, logical clock, commit validation, snapshot reads,
PRAGMA journal_mode,BEGIN CONCURRENTrules, sibling handles viaConnection::connect, the retry loop shape, per-SDK error mapping (SqlriteStatus::Busy,sqlrite.BusyError,errorKind('Busy'),sqlrite.ErrBusy), the.spawn/.use/.connsREPL meta-commands, WAL log-record durability and reopen replay, and the limitations and explicitly-parked follow-ups.Worked example
$ cargo run --example concurrent_writers === Disjoint-row commits both succeed === account 1 (alice): 110 account 2 (bob): 120 === Same-row commits: A wins, B retries === B lost the race: Busy: write-write conflict on accounts/1: another transaction committed this row at ts=7 (after our begin_ts=6); transaction rolled back, retry with a fresh BEGIN CONCURRENT account 1 (alice): 165 account 2 (bob): 120Cross-ref refresh
docs/concurrent-writes-plan.mddocs/_index.mddocs/supported-sql.mdPRAGMA journal_mode+BEGIN CONCURRENTsections gain a "see concurrent-writes.md" callout; the "Not yet supported" entry forBEGIN CONCURRENTremoveddocs/embedding.mddocs/roadmap.mddocs/design-decisions.mdexamples/README.mdWhat's still open in Phase 11
set_journal_mode(Mvcc → Wal)onceMvStorecan be drainedTest plan
cargo build --workspace --exclude sqlrite-desktop --exclude sqlrite-python --exclude sqlrite-nodejs --exclude sqlrite-benchmarks --all-targetscargo test --workspace --exclude sqlrite-desktop --exclude sqlrite-python --exclude sqlrite-nodejs --exclude sqlrite-benchmarks— 615/615cargo fmt --all -- --checkcargo clippy --workspace --exclude sqlrite-desktop --exclude sqlrite-python --exclude sqlrite-nodejs --exclude sqlrite-benchmarks --all-targetscargo doc --workspace --exclude sqlrite-desktop --exclude sqlrite-python --exclude sqlrite-nodejs --exclude sqlrite-benchmarks --no-depscargo run --example concurrent_writers— verified retry path triggers and final balances are correct🤖 Generated with Claude Code