feat: attach recovery envelopes to atomic DB WAL batches - #51
Merged
Conversation
Preserve-mode merges can leave EmptyRoot sentinels below inner nodes. Count each emitted sentinel in the routing arena so filter-mode compaction cannot cross its measured boundary. Signed-off-by: Guocheng(Eric) Song <132118805+feichai0017@users.noreply.github.com>
Applications need canonical recovery records to share the commit boundary of the metadata mutations they describe. Store one opaque envelope and its guarded multi-tree batch in the same WAL record, with checkpoint-bounded local retention. Signed-off-by: Guocheng(Eric) Song <132118805+feichai0017@users.noreply.github.com>
Document the WAL format boundary and migration path. Update the crate version, install examples, supported-version table, and standalone lockfiles for the 0.9.0 release. Signed-off-by: Guocheng(Eric) Song <132118805+feichai0017@users.noreply.github.com>
The checkpointer removes retry candidates from the FIFO while it tests them, then restores pinned entries. Assert the durable blob state instead of sampling that transient queue window under coverage instrumentation. Signed-off-by: Guocheng(Eric) Song <132118805+feichai0017@users.noreply.github.com>
feichai0017
marked this pull request as ready for review
August 13, 2026 19:05
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.
What changed
NoKV needs each canonical recovery record to share the commit boundary of the metadata mutation it describes. This PR adds an attached recovery stream to
DB. One opaque envelope and its guarded multi-tree batch share one CRC-covered WAL record.The file-backed stream stores its checkpoint floor in the format-4 WAL header. Retained WAL records define the current tail. A checkpoint mirrors the anchor before truncating the retained suffix. Memory databases provide the same ordering and paging only during the current process. After stream initialization, Holt rejects ordinary logical writes and requires attached batches.
The branch also fixes routed-compaction accounting for reachable
EmptyRootnodes and prepares Holt 0.9.0.Compatibility
Durability::Wal { sync: true }puts each acknowledged attached batch on a forced sync boundary.sync: falsedoes not provide per-acknowledgement power-loss durability.Error::JournalPositionExpired.DB::export_checkpoint()andDB::install_checkpoint()into a fresh 0.8.x store.Test plan
cargo build --workspace --all-targets --all-features --lockedcargo test --workspace --all-features --lib --tests --examples --lockedcargo test --workspace --all-features --doc --lockedcargo publish --dry-run --locked --allow-dirtyRegression tests cover crash replay without a checkpoint, dual anchor-slot corruption, interrupted checkpoint retry, legacy WAL migration, and read-only export. They also cover stream fencing, concurrent anchors, checkpoint lock ordering, bounded paging, oversized records, and reachable-empty-root compaction.
The local host lacks rustup/nightly and
cargo-llvm-cov. GitHub Actions runs the fuzz smoke and 88% coverage gates.A downstream NoKV capacity oracle ran two 500-publish batches against the attached stream. The second batch did not raise Holt's slot high-water mark. Its logical store growth was 0.055 MiB per publish.
Related
This implements the checkpoint-bounded recovery suffix under ROADMAP P1. Live subscription and shared retention remain separate work.
NoKV adoption and existing-store migration remain downstream work.
This maintainer-directed Holt 0.9.0 storage work has no linked issue.
After merge, tag the exact merged
maincommit asv0.9.0. The release workflow publishes the crate and creates the GitHub release.