Skip to main content

Module filestore

Module filestore 

Source
Expand description

FileStore: file storage with write-through cache + background flusher. Port of Goโ€™s pkg/filestore/blockstore.go, blockstore_cache.go, blockstore_dbops.go.

  • Separate SQLite DB from Store (matching Go).
  • 64KB parts for efficient partial reads/writes.
  • Write-through cache with periodic flush (5s default).
  • Background flusher via tokio::spawn + tokio::time::interval.

Re-exportsยง

pub use core::FileStore;
pub use core::DEFAULT_FLUSH_SECS;
pub use core::MAX_CACHE_BYTES;
pub use types::FileMeta;
pub use types::FileOpts;
pub use types::MuxFile;
pub use zone_txn::ZoneTxn;
pub use counter::normalized_records;
pub use counter::AppendPos;
pub use counter::Counted;
pub use counter::CountedAppend;
pub use counter::LineState;
pub use replace::DerivedSnapshot;
pub use replace::DerivedView;
pub use replace::SnapshotFile;
pub use replace::SnapshotReader;

Modulesยง

cache ๐Ÿ”’
Internal cache structs for FileStore.
checkpointer ๐Ÿ”’
Background WAL checkpoints for a file-backed [FileStore] (Phase 5a-3, SPEC_AGENT_PANE_BOUNDED_LIVE_WINDOW_MIGRATION_2026_09_23.md ยง6.3.7 item 5).
core ๐Ÿ”’
FileStore struct and CRUD operations.
counter ๐Ÿ”’
Per-file line counter and generation (Phase 5a-2, SPEC_AGENT_PANE_BOUNDED_LIVE_WINDOW_MIGRATION_2026_09_23.md ยง6.3.7).
ijson ๐Ÿ”’
FileStore IJson (incremental JSON) operations.
lines ๐Ÿ”’
The transcript line rule, shared by the output.idx indexer and the per-file line counter (Phase 5a-2, SPEC_AGENT_PANE_BOUNDED_LIVE_WINDOW_MIGRATION_2026_09_23.md ยง6.3.7).
offset_ops ๐Ÿ”’
FileStore offset-based read/write operations.
replace ๐Ÿ”’
Multi-file replace and delete in one transaction (Phase 5a-2b, SPEC_AGENT_PANE_BOUNDED_LIVE_WINDOW_MIGRATION_2026_09_23.md ยง6.3.7 item 4).
types ๐Ÿ”’
Wire types matching Goโ€™s wshrpc types for file storage.
zone_txn ๐Ÿ”’
Read-modify-write of small files in one zone, as one transaction across processes (SPEC_MEMORY_FOLLOWS_THE_AGENT_2026_09_24.md ยง2.1.1).