You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test: reopen and replay one heavy WAL entry through Minigraf::open #865
Found by #843 (X08 of the #776 close-out) at v3 a95e51ffe.
Gap
No test opens a database whose WAL holds one heavy entry and checks the replayed facts.
wal::tests::test_wal_entry_of_more_than_a_million_facts_replays (WAL entries of more than 1M facts are never replayed: the transaction and every later one are lost #686) covers the WAL layer only: WalWriter writes an entry of 1,000,001 facts, the tail cut on reopen keeps it, and WalReader::read_entries returns it. It does not open a Minigraf, so the replay into the pending store, the queries over it and the checkpoint that follows are not exercised.
large_transaction_acceptance_test (ignored, nightly) covers statements larger than the chunk. Those commit as checkpoints and leave no WAL entry.
The open/wal_replay/{1k,10k,100k} benchmarks use 100-fact statements.
On v3 a statement or WriteTransaction of up to transaction_chunk_facts facts (default 65,536, at most 1,000,000) stays small, so a v3 writer can produce one WAL entry of up to 1,000,000 facts. A v2.x writer could produce entries of more than 1,000,000 facts (#686), which a v7 → v8 migration replays.
Proposed test
Correctness only, with no timing:
A file database opened with transaction_chunk_facts(1_000_000) and wal_checkpoint_threshold(usize::MAX). One transact of exactly 1,000,000 facts, then one small statement. Drop the handle without a checkpoint (kill/crash child, as in crash_kill_test).
Reopen. Check the facts of both entries through EAVT, AEVT and AVET paths, check current_tx_count() == 2, then checkpoint, verify() and reopen again.
Optionally do the same for a v7 file whose WAL has one entry of more than 1,000,000 facts, built by the v2.x writer, if a frozen fixture can stay small enough.
Debug-build cost is large, so the test likely belongs with the ignored acceptance tests that smoke.yml runs nightly. Measure on the bench machine before choosing.
No production change is expected. If the test fails, it becomes a data-integrity bug.
Activity
Merge pull request #867 from project-minigraf/test/865-heavy-wal-replay
adityamukho commentedon Nov 6, 2026
Fixed by #867 (merged to v3 as 472e3f2). The nightly test passes; no production change.