Pluggable index storage for build-while-reading - #1
Merged
vsazhenyuk-softheme merged 6 commits intoJun 11, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a pluggable-storage variant of the index builder/decoder so access points + 32KB windows can be persisted in arbitrary backends (and consumed concurrently while the index is still being built), reusing the same decompression/seek core as the file-backed implementation.
Changes:
- Introduces
IndexStorage,Window/WindowFormat, and store-backed*StoreIndexBuilder/*StoreDecoderpublic APIs. - Refactors the shared decompression/seek logic into a storage-agnostic
Engine+SeekPointlayer used by both file-backed and store-backed paths. - Adds integration tests for store-backed indexing/decoding and strengthens CI (fmt/clippy/rustdoc warnings as errors) plus a manual release workflow.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
src/store.rs |
Implements the store-backed builder/decoder and the IndexStorage contract. |
src/base.rs |
Refactors shared decompression/seek code into Engine/SeekPoint and adapts file-backed types. |
src/lib.rs |
Exposes the new store-backed public API surface via a macro-generated interface. |
tests/store.rs |
Adds integration tests covering store-backed indexing, concurrent read-while-build, and tar.gz random access. |
README.md |
Documents the new pluggable storage API and usage. |
.github/workflows/rust.yml |
Expands CI to include fmt/clippy/docs checks. |
.github/workflows/release.yml |
Adds a manually-invoked release workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vsazhenyuk-softheme
deleted the
feat/flexible-storage-for-indexes-windows
branch
June 11, 2026 10:40
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.
Problem
The index could only be persisted to a single seekable file, and the access-point table was written only on
finish(). That made it impossible to use an index while it was still being built — a separate decoder had nothing toread until the builder completed — and it hard-wired the index layout to a local file, ruling out other backends or concurrent readers.
Solution
Introduced an
IndexStoragetrait that abstracts where access points and their 32 KB windows live, alongside new store-backed types (GzStoreIndexBuilder/GzStoreDecoder, plusDeflate*/Zlib*variants). Thedecompression core was extracted into a shared
Engine, so the existing file-based path is reused verbatim and its on-disk format is unchanged.This enables:
appendas it's produced, so a decoder sharing the store can seek immediately, with nofinish()required.&self, so one cloneable handle feeds a builder and a decoder on different threads.Window encoding is selectable via
WindowFormat(RaworDeflate) and is self-describing on read. Backend errors surface through a newError::Callbackvariant.