Skip to main content

Crate store_io_engine

Crate store_io_engine 

Source
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::Submitter hands 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§

AppendBatch
Many appends written together and made durable with one barrier.
AppendRegion
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.
CopyOptions
How copy_store builds its target.
CopyReport
What copy_store copied.
DamagedSlot
A metadata slot an open found damaged.
Directory
A directory of small objects, each replaced atomically.
MetadataReport
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.
PageBatch
Many page writes submitted together and made durable with one barrier.
PageRegion
A region of caller-addressed blocks, overwritten in place.
RegionOptions
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.
ScanSummary
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.
SpaceReport
Where a store’s space goes.
Store
A store: one container file on one device.
StoreOptions
Explicit, reported choices for a store. Every durability-affecting field appears in Store::report.
StoreReport
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).
SubmitterWaker
Ends a crate::Submitter’s current or next wait from another thread (D-083), whether it waits for I/O or for a flush.
TagSpace
Usage of one tag.
UnavailableRegion
A region the region table names that could not be opened (D-090).

Enums§

Healed
Which metadata write a format-2 open healed.
RegionKind
What a region is for.
Repair
What one repair of a store did (v0.5 E6), as Store::repairs returns it: for the caller’s own log (the library prints nothing).
ScanItem
One step of a scan, in region order.
SlotDamage
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 from into a new format-2 store in to, whose directory must hold no store. See the module docs.