8000 test: replay one heavy WAL entry through Minigraf::open (#865) by adityamukho · Pull Request #867 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

test: replay one heavy WAL entry through Minigraf::open (#865) - #867

Merged
adityamukho merged 1 commit into
v3from
test/865-heavy-wal-replay
Nov 6, 2026
Merged

adityamukho merged 1 commit into
v3from
test/865-heavy-wal-replay

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

Closes #865

What

one_million_fact_wal_entry_replays_on_open in tests/large_transaction_acceptance_test.rs (ignored; runs in the nightly large-transaction acceptance job):

  1. File database with transaction_chunk_facts(1_000_000) and wal_checkpoint_threshold(usize::MAX). One transact of exactly 1,000,000 facts (half on new entities, half on 32 repeated entities), then one small statement. Asserts the WAL exists and verify().facts == 0 (nothing checkpointed), then drops the handle. With the usize::MAX sentinel 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.
  2. Reopen, check entity (EAVT), attribute-scan (AEVT) and attribute-value (AVET) lookups, current_tx_count() == 2 and the :as-of 1 boundary between the entries. Then checkpoint(), verify() (intact, 1,000,001 facts), check again, reopen and check again.

.github/acceptance/verify.py now expects the new test in the large-transaction suite.

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

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
codecov Bot commented Nov 6, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@adityamukho
adityamukho merged commit 472e3f2 into v3 Nov 6, 2026
19 checks passed
@adityamukho
adityamukho deleted the test/865-heavy-wal-replay branch November 6, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0