PR: storage: Phase 3 — AsyncFihIo, FlushCapable, chain flush, ColdStorage trait, Time Machine tests #85#86
Draft
metasmile wants to merge 10 commits into
Draft
PR: storage: Phase 3 — AsyncFihIo, FlushCapable, chain flush, ColdStorage trait, Time Machine tests #85#86metasmile wants to merge 10 commits into
metasmile wants to merge 10 commits into
Conversation
…, Arc without outer Mutex) #{85}
Introduce `first_ts()` and `last_ts()` on `TimeIndex`. Add `ScanCapable`, `TimeRangeCapable`, and `ColdStorage` trait implementations on `NativeFihStorage`. Add `read_state_uncached` for cold-path reads. Gate cache and index updates behind `is_hotmemory_enabled`. Fix `concluded_at` to return the stored timestamp instead of hardcoded `1`.
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.
PR: storage: Phase 3 — AsyncFihIo, FlushCapable, chain flush, ColdStorage trait, Time Machine tests #85
Summary
Phase 3 completes the storage abstraction stack for NativeFihStorage. It consolidates the FIH storage prototype around a single AsyncFihIo trait, adds chain-based incremental flush (cursor_{ts}.chain), implements ColdStorage + ScanCapable + TimeRangeCapable for DualStorage compatibility, and validates the full StateSpace as a 4D time-travelable storage (Fact × Intent × Hint × time).
Changes
storage/sim/src/io.rsstorage/sim/src/sim_io.rsstorage/sim/src/fs_io.rsstorage/sim/src/intent_status.rsstorage/sim/src/record.rsstorage/sim/src/index.rsstorage/sim/src/session.rsstorage/sim/src/store.rsstorage/sim/src/main.rsstorage/sim/tests/concurrency.rsstorage/sim/tests/gaps.rsstorage/sim/tests/time_filter.rsstorage/sim/tests/foundational_scenarios.rsstorage/sim/tests/gateway_scenarios.rsstorage/sim/tests/time_machine.rsstorage/sim/tests/common/mod.rsKey Design Decisions
cursor_{ts}.chaincontaining only delta records since the previous cursor. File count = O(flush count), not O(record count). Enables incremental replay.FactCache,IntentCache,HintCache,RefCounts,OriginIndexisolate the concrete map type. Switching from HashMap to BTreeMap requires only 5 alias lines.4D StateSpace (Storage Paradigm)
nexus storage is not a graph database. It is a 4D StateSpace:
Coordinate traversal (moving along axes, projecting across dimensions) IS the query mechanism. Cypher translation is optional syntactic sugar — the native API (FilterCapable + TimeIndex + by_from_fact) already provides the full coordinate algebra.
Validation
cargo testcargo runcargo clippy -- -D warningscargo build --target wasm32-unknown-unknownrun.sh --core(fmt + clippy + test)Follow-up Issues