Repository navigation
feat: large single statements commit as a checkpoint (#550 PR 2) - #685
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
…ek (#550) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
Minigraf::execute of a statement over TX_CHUNK_FACTS facts on a file database writes it a chunk at a time into copy-on-write working trees behind a header-only WAL guard and commits it as a checkpoint. A WAL found at open, or a rolled-back large transaction, marks the handle dirty so the next checkpoint writes a meta before deleting the WAL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
…M acceptance (#550) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
…ile (#550) Windows refuses reading a file another handle holds an exclusive lock on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Oct 22, 2026
adityamukho
added a commit
that referenced
this pull request
Oct 23, 2026
* ci(crash-kill): run v3's nightly rounds with test-oracle (#687) Scheduled workflows run the copy on the default branch, so v3's --features test-oracle change (#685) never reached the nightly v3 run and its Large variant (#550) did not run. Land v3's crash-kill.yml on main unchanged; main has no test-oracle feature and keeps its command. Closes #687 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT * ci(crash-kill): pass test-oracle wherever Cargo.toml defines it (#687) A dispatch on a main-based ref other than main would have passed a feature that does not exist there; a v3-based branch keeps the variant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Part of #550 (streaming engine 8/9, #473): PR 2 of 3, large single statements (spec
docs/superpowers/specs/2026-10-21-streaming-transactions-design.md§4; plan PR 2 section indocs/superpowers/plans/2026-10-21-550-streaming-transactions.md, committed here).What changes
Minigraf::executeof atransact/retractwith more thanTX_CHUNK_FACTSfacts on a writable file database becomes large:g) before any page is written (§4.5 rule 1).g + 1; nexttx_countreserved;tx_idfixed; allocatorfrom_chain(.., g + 1)with the quarantine and id tracking.API-019at the fixedtx_id,API-011,WAL-003), stamped, encoded by a per-chunkEncoderover the working DICT (noSharedDictCache), checked against earlier chunks (a repeated fact stored once, another window of its tripleAPI-011), and applied withcow_update. Replaced pages the transaction wrote are released (PageAllocator::release),g's go tofreed.g + 1(the commit point),tx_countallocated, publish, WAL deleted.g, written pages evicted, handle dirty); I/O failures also mark the handle failed (STG-046).Statement::chunksyields oneChunkat a time.test-oraclegetsminigraf::__tx_chunk_factsand__statement_facts_high_water.Deviations from the spec (listed in the plan)
WriteTransactionkeeps the staged path until PR 3 (it needs §5 deletes and §7 reads); spec §9 had first-statement-largeWriteTransactions in PR 2.tx_countis allocated at the commit point, not when the transaction becomes large, so a rolled-back large transaction takes none.valid_fromand one whose explicitvalid_fromequals the fixedtx_id, in different chunks, are kept once instead of beingAPI-011.Facts only.Tests
large_tx.rs(7): same records as the one-chunk path at chunk sizes 1–4 over a workload (repeats, windows, long values, refs, retractions, pending WAL entries), returnedtx_idand:as-of, rejected large statements (API-011,WAL-003) write nothing, take notx_countand keep the WAL until a checkpoint writes a meta, the open-time dirty rule, the §4.5 reproduction (a new file reopens through the guard and isSTG-033without it), and cursors and fact logs opened before or between chunks keep their snapshot.crash_kill_test.rs: atest-oraclevariant where most transactions are large and a failing large statement rolls back after writing pages (120 rounds locally).crash-kill.ymlpasses--features test-oraclefor v3 only; the file has to land onmaintoo (follow-up PR), because scheduled runs usemain's copy.model_based_test.rsundertest-oracleat chunk size 2 (300 cases locally).tests/large_transaction_acceptance_test.rs(ignored, nightly insmoke.yml): 1M-facttransactheld at most 16,384 facts, peak RSS 37 MiB, 24 s including the commit. Today's path on the same input: 1,000,000 facts held, 1028 MiB, 10.2 s for the WAL entry alone, with no checkpoint.test-oraclesuite with the default chunk size forced to 3 passes (1752/0).Counts: 1752 tests (1738 passing, 14 ignored).
No
CHANGELOG.mdor docs-site change: PR 3 documents them.🤖 Generated with Claude Code
https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT