Expand description
§store-io-engine
The engine of store-io, generic over any store-io-platform backend.
domain: flush domains and the join rule: barriers share device flushes with no timer, and a failed flush poisons the device forever.frontier: lock-free append frontiers: atomic space reservation, out-of-order completion, contiguous completed and durable prefixes.Store: one container: create, open, read-only open, provisioning, the device report, poisoning.AppendRegion,PageRegion,Slot: the data surfaces.AppendBatch,PageBatch: many writes, one barrier.Submitter: many reads and writes in flight from one thread, without blocking; tickets from completions (completion).AppendRegion::scan,PageRegion::scan: the raw ordered recovery read, which never stops at bad data.receipt: positions, write tickets and durability receipts, which only this crate can create.
Re-exports§
pub use completion::SubmitterConfig;pub use completion::WriteMode;pub use domain::DomainStats;pub use receipt::DurableReceipt;pub use receipt::RegionPos;pub use receipt::WriteTicket;
Modules§
- completion
- What the engine-layer
crate::Submitterhands back (D-098): its configuration, refusals and completions. - domain
- The flush domain: one per device (one per container file in the default layout). It decides when a barrier needs a new device flush and lets concurrent barriers share one, with no timer and no waiting for company.
- frontier
- The append frontier of one append region: where the next append goes, and how far the region is contiguously written and contiguously durable.
- receipt
- Positions, write tickets and durability receipts.
Structs§
- Append
Batch - Many appends written together and made durable with one barrier.
- Append
Region - A region store-io appends to. Positions are chosen by store-io from an atomic tail, so appends from many threads never overlap and a written block is never rewritten.
- Copy
Options - How
copy_storebuilds its target. - Copy
Report - What
copy_storecopied. - Damaged
Slot - A metadata slot an open found damaged.
- Directory
- A directory of small objects, each replaced atomically.
- Metadata
Report - What a format-2 open found in its metadata pairs (the volume record and the table pages).
- Outstanding
- The oldest operation in flight on the store’s queues.
- Page
Batch - Many page writes submitted together and made durable with one barrier.
- Page
Region - A region of caller-addressed blocks, overwritten in place.
- Region
Options - A region’s size, and the most it may ever grow to.
- Reservation
- Space set aside for provisioning under one tag. Regions provisioned from it can never fail for lack of space; whatever is left when it is dropped returns to the free pool.
- Scan
Summary - How a scan ended.
- Slot
- A small object (a manifest, a superblock) committed atomically: after any crash it reads back as exactly the old or exactly the new version.
- Space
Report - Where a store’s space goes.
- Store
- A store: one container file on one device.
- Store
Options - Explicit, reported choices for a store. Every durability-affecting field
appears in
Store::report. - Store
Report - What the store learned about its device, and what it decided.
- Submitter
- Many reads and writes in flight from one thread (D-065, D-098).
- Submitter
Waker - Ends a
crate::Submitter’s current or nextwaitfrom another thread (D-083), whether it waits for I/O or for a flush. - TagSpace
- Usage of one tag.
- Unavailable
Region - A region the region table names that could not be opened (D-090).
Enums§
- Healed
- Which metadata write a format-2 open healed.
- Region
Kind - What a region is for.
- Repair
- What one repair of a store did (v0.5 E6), as
Store::repairsreturns it: for the caller’s own log (the library prints nothing). - Scan
Item - One step of a scan, in region order.
- Slot
Damage - What an open made of a damaged metadata slot
(
MetadataReport::damaged_slots, spec §7). - Unavailable
- Why a region the region table names could not be opened (D-090).
Constants§
- CONTAINER
- The container file name inside the store directory.
- COPYING
- The temporary name a copy’s target is built under (no live store ever has it: one left by a crashed copy is removed by the next).
- COPY_
LOCK - The file in a copy’s target directory whose lock a copy holds from before it looks for a store there until after its rename (created by the first copy and kept: removing a lock file races its next user).
- MAX_
DEPTH - The largest
SubmitterConfig::depth.
Functions§
- copy_
store - Copies the store in
frominto a new format-2 store into, whose directory must hold no store. See the module docs.