Repository navigation
Merge main into v3: bench issue branch names (#566), Bencher window (#568), v2.0.5, v2.x fixes - #569
Merged
Merged
Conversation
Backport of the v3 fix (#534) to v2.x. RecursiveEvaluator seeded seen_facts with every base fact and compared its size with max_results, so on a database with max_results (default 1,000,000) live facts every rule query failed with INT-020 at its first derived fact, whatever the size of its answer. The limit now counts only the facts the rules derive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012wXxZguv7PgKQjMMH4yJ5h
fix(query): count only derived facts against max_results (#528, v2.x backport)
…lose-time save (#457, #476) Backport of #525 and #526 (v3) to v2.x. - #457: do_checkpoint's early return (nothing to flush) now deletes a WAL whose entries are all already in the file, and syncs the parent directory. The golden-corpus test requires v7_stale_wal to have no WAL after a checkpoint. - #476: Inner::drop under wal_checkpoint_threshold(usize::MAX) discards the storage's dirty flag, so PersistentFactStorage::drop saves nothing; the WAL keeps the pending facts for the next open. OpenOptions field docs say what usize::MAX does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012wXxZguv7PgKQjMMH4yJ5h
Doc sync (CHANGELOG, CLAUDE.md, ROADMAP, README, TEST_COVERAGE) and version bump to 2.0.5. v2.x patch: a sub-page file is refused with STG-045 unless it is a torn first write (#506); a commit after a torn WAL entry is no longer lost, failed appends poison the handle with WAL-007 (#513); backports of #528, #457 and #476 from v3; weekly soak test (#392) and working coverage gates (#396). File format v7 unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012wXxZguv7PgKQjMMH4yJ5h
Backport of the v3 fixes (PRs #556, #557) to v2.x. #554: commits added a transaction's facts to FactStorage one load_fact call at a time, each under its own write lock, so a query on another thread could see part of the transaction. FactStorage::load_facts appends a batch under one lock; execute, WriteTransaction::commit, WAL replay and BrowserDb's commit use it. #555: selective_fact_fetch read each entity/attribute lookup under its own read lock, so a commit between two lookups was seen by some patterns and not others. The three lookup bodies become functions over &FactData and FactStorage::get_facts_for_lookups runs them all under one read guard. The old methods remain for tests only. The file-backed #555 reproducer disables checkpoints: on v2.x a query that runs during a checkpoint can lose committed facts, a separate bug. Refs #554, #555 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012wXxZguv7PgKQjMMH4yJ5h
…f-written (#558) save() appends the new fact pages at 1 + old_fact_page_count, over the pages of the index that queries on other threads read through the published CommittedIndexReader, and then published the new readers and cleared the pending facts with three separately locked calls. A query during a checkpoint could miss committed facts or see part of a transaction. FactStorage::lock_for_checkpoint returns a guard on the store's write lock. save() takes it before the backend lock (the order queries use: store read lock, then backend), reads the pending facts through it, and publishes both readers and clears pending in one step (CheckpointGuard::publish). get_pending_facts and post_checkpoint_clear are now test-only. v3 is not affected (copy-on-write checkpoints). Refs #558 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012wXxZguv7PgKQjMMH4yJ5h
fix(storage): queries wait for a checkpoint instead of reading it half-written (#558)
Issues for main were titled "Benchmark regression: <suite>" with no branch, while v3 issues carried "(v3)". Title every issue "Benchmark regression: <suite> (<branch>)", like the nightly fuzz issue, and add a Branch line to the body. An open issue with the old main title is still matched, renamed and commented on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HyLscCUuJ1GQpdAeX79EdR
ci(bench): name the branch in every regression issue
Brings in #566 (every nightly benchmark regression issue names its branch), the v2.0.5 release and the v2.x backports #538, #540, #559 and #560. Resolution: v3 keeps its own fixes for #528, #457, #476, #554 and #555, so src/ and the conflicting tests keep v3's side; main's copy of the #476 test in tests/wal_test.rs is dropped (v3 already has it). #558 is v2.x only (v3's copy-on-write checkpoints are not affected), but its race test `checkpoint_never_hides_committed_facts` is added to tests/snapshot_atomicity_test.rs as a guard; it passes on v3. CHANGELOG gains the v2.0.5 section; Cargo.toml version follows main (2.0.5). Test count: 1442 (1431 passing, 11 ignored). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HyLscCUuJ1GQpdAeX79EdR
) Bencher's t-test used every sample since May, so a correct step change kept alerting for weeks: query/pre 8000 dicate_pushdown/100k since #445 (#512, #495), and checkpoint/* and open/wal_replay/100k since #476's backport stopped the drop-save that had made those fixtures no-ops (#561, #562). Replaying main's history, a 30-run window still alerts on two runs in a row for a lasting change, then takes it as the baseline after about five runs. Claude-Session: https://claude.ai/code/session_016QAt9R1aSPQG7rV5ouFDMU Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016QAt9R1aSPQG7rV5ouFDMU
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
adityamukho
added a commit
that referenced
this pull request
Oct 13, 2026
docs: v2.0.5 status line and test counts on v3 after #569
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.
Merges
mainintov3(merge commit). Brings in:Resolution
v3already has its own fixes for bug: a rule query fails with INT-020 on any database with 1,000,000 or more live facts #528, WAL whose entries are all checkpointed survives checkpoint() until the next write #457, Close-time save ignores wal_checkpoint_threshold(usize::MAX) #476, bug: a query can see part of a committed transaction #554 and bug: patterns of one query can read different database states under concurrent writes #555, sosrc/and the conflicting tests keepv3's side.tests/wal_test.rsauto-merged a second copy of the Close-time save ignores wal_checkpoint_threshold(usize::MAX) #476 testv3already has (it would not compile);v3's file is kept.v3's copy-on-write checkpoints do not overwrite pages a published reader uses. Its race testcheckpoint_never_hides_committed_factsis added totests/snapshot_atomicity_test.rsas a guard and passes onv3.v3's Unreleased section is kept, with a Tests line forsnapshot_atomicity_test.rs;main's v2.0.5 section is inserted before v2.0.4.Checks
cargo test --quiet: 1431 passing, 0 failed, 11 ignored (1442 total). fmt clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01HyLscCUuJ1GQpdAeX79EdR