Repository navigation
test: replay one heavy WAL entry through Minigraf::open (#865) - #867
Merged
Merged
Conversation
A nightly acceptance test writes one WAL entry of exactly 1,000,000 facts (transaction_chunk_facts(1_000_000)) and a small second entry, closes without a checkpoint (wal_checkpoint_threshold(usize::MAX)), then checks the replayed facts through entity, attribute-scan and attribute-value lookups, current_tx_count() == 2 and the :as-of 1 boundary, after replay, after checkpoint + verify() and after a second reopen. Registered in the large-transaction acceptance evidence verifier. No production change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H2a7QoYX6tc5G3sKVzvLjD
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Closes #865
What
one_million_fact_wal_entry_replays_on_openintests/large_transaction_acceptance_test.rs(ignored; runs in the nightlylarge-transactionacceptance job):transaction_chunk_facts(1_000_000)andwal_checkpoint_threshold(usize::MAX). Onetransactof exactly 1,000,000 facts (half on new entities, half on 32 repeated entities), then one small statement. Asserts the WAL exists andverify().facts == 0(nothing checkpointed), then drops the handle. With theusize::MAXsentinel the drop discards the storage instead of saving it (Close-time save ignores wal_checkpoint_threshold(usize::MAX) #476), so the reopen has to replay both entries. A plain drop is used instead of a kill child: the file holds no facts either way.current_tx_count() == 2and the:as-of 1boundary between the entries. Thencheckpoint(),verify()(intact, 1,000,001 facts), check again, reopen and check again..github/acceptance/verify.pynow expects the new test in thelarge-transactionsuite.Not done: step 3 of the issue (a frozen v2.x fixture with an entry of more than 1,000,000 facts). Its WAL alone would be about 50 MB, so it is too big to keep in the repo.
Results
Run on the alternate bench host,
--profile bench: passes in 16.5 s. Writing took 3.7 s, the WAL was 49 MiB and the replay on open took 3.4 s. The whole suite took 75 s, well inside the job's 30-minute timeout. No data-integrity bug was found, so there is no production change.Docs:
docs/TEST_COVERAGE.md(test-hooks ignored count 23 → 24, total 2,099 → 2,100),CHANGELOG.md, and a follow-up note on H4 in the #843 map.🤖 Generated with Claude Code
https://claude.ai/code/session_01H2a7QoYX6tc5G3sKVzvLjD