Repository navigation
Review fixes: page-view bounds, leaner core, honest docs, Graviton4 + gp3 benchmark - #171
Merged
Merged
Conversation
…raviton4 + gp3 benchmark run - README and USING say the docs describe main, ahead of 0.2.0, and list the differences. - Performance figures come from a new run on Graviton4 with EBS gp3 (current main, default and validating); the report is in benches/results. - ARCHITECTURE gains a ZeroDB and LMDB comparison table. - PROVENANCE.md states how the project was built and what is and is not verified. - DECISIONS.md is grouped by status and explains the reserved numbers. - ADR-0043 (proposed): bitflags and tempfile. - Reader wording: readers never wait on a write transaction; beginning one takes a short mutex. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Fixes: - LeafRef::new and BranchRef::new reject a buffer shorter than the page size; LeafMut::lookup bounds-checks its reads. - zerodb-tools check walks a read-only map in its raw fallback and no longer reads the whole file. - pwritev is retried on EINTR. - remove_span leaves the page unmodified on error. - zerodb-tools rejects extra positional arguments. - check gains entry points that take each database's key order. Leaner: - The batch tree builder is compiled for tests only. - dirty and EnvInner are crate-private; StampKind and a few forwards are gone. - ComparatorError, LockOpenError and DumpError derive thiserror::Error. Comments in the four engine crates no longer carry history, measurements, issue numbers or internal codes. The bench harness gains ZERODB_BENCH_VALIDATE. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Important Review skippedToo many files! This PR contains 108 files, which is 8 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.
|
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.
Summary
Outcome of a full review of the repository (code, tests, docs, benchmarks), plus a new benchmark run on the target hardware. Two commits: docs and benchmark report, then code.
Fixes
LeafRef::newandBranchRef::newaccepted a buffer shorter than the page size and then read withget_unchecked: an out-of-bounds read from safe code when called directly (the engine always passes whole pages). They now returnPageError::BufferTooSmall.LeafMut::lookuphad a similar hole and now bounds-checks its reads.zerodb-tools checkread the whole data file into memory in its raw fallback. It now walks a read-only map. One behavior change: a meta naming a map size above the supported maximum is reported as an INV-1 violation and the trees are not walked.pwritevis retried onEINTR.remove_spanleaves the page unmodified when it returns an error.zerodb-toolsrejects unexpected extra arguments.checkgainscheck_image_with_key_order/check_snapshot_with_key_order, so a caller holding a custom comparator can have key order checked under it. The default entry points and the CLI are unchanged.Leaner code
dirtyandEnvInnerare crate-private;StampKind, a forwarding cursor method and oneforce_synclayer are removed.ComparatorError,LockOpenErrorandDumpErrorderivethiserror::Error, with tests pinning every message.Docs
main, which is ahead of 0.2.0, and list the differences.docs/ARCHITECTURE.md: a ZeroDB and LMDB comparison table.docs/PROVENANCE.md(new): how the project was built, what is verified and what is not.docs/DECISIONS.mdgrouped by status; reserved numbers 0036 and 0040 explained.bitflagsandtempfile.Benchmark
Current
mainon AWSc8g.xlarge(Graviton4) with an EBS gp3 volume, default and validating:benches/results/2026-11-12-ladder-meilisearch-graviton-gp3.md. ZeroDB time ÷ LMDB time, default options:The bench harness gains
ZERODB_BENCH_VALIDATE=1.Checks
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace,cargo doc --workspace --no-deps(no warnings).cargo test --workspace,just crash-test-quickequivalents (200 cycles, 50 multi-process cycles).For the maintainer to decide
README.mdanddocs/PROVENANCE.mdbefore publishing.checkfunctions are new public API; CONTRIBUTING rule 5 asks for an ADR.assert!on the free-list save round count in commit (the 64-round bound is not proven), the validation caches,WRITE_MAP, and replacing the/proc/self/mountinfoparsing withfstatfs.🤖 Generated with Claude Code