pub struct SpoolProgress {
pub entries_copied: u32,
pub committed_upto: LogPosition,
pub caught_up: bool,
pub gap: bool,
pub volume_erased: u32,
}Expand description
What one replication pass achieved.
Fields§
§entries_copied: u32Entries copied in this pass.
committed_upto: LogPositionSource position now durably replicated.
caught_up: boolNothing further is waiting: the replica is level with the source’s durable tail.
gap: boolThe resume point had fallen off the tail of the source ring, so entries between it and the oldest retained sector were never copied.
Not an error: it is what happens when a medium stays away long enough for the ring to wrap.
volume_erased: u32Sectors the pass erased on the volume.
SpoolBudget bounds how much a pass copies, but not how long it takes,
and an erase is the one operation whose cost is nothing like the rest:
100 ms or more on many NOR parts, against microseconds for a page write.
A pass that fills the replica’s active sector, or that wraps the cursor
region, pays that.
Use it to back off — spool less often, or with a smaller budget — when a caller has latency it must meet elsewhere. Zero for most passes.
This covers erases the replication pass caused. Under
WritePolicy::CardFirst samples
go straight to the volume, so the same spike can land on append
instead; SensorDb::sectors_erased on
the volume is the counter that sees those.
Trait Implementations§
Source§impl Clone for SpoolProgress
impl Clone for SpoolProgress
impl Copy for SpoolProgress
Source§impl Debug for SpoolProgress
impl Debug for SpoolProgress
Source§impl Default for SpoolProgress
impl Default for SpoolProgress
impl Eq for SpoolProgress
Source§impl Format for SpoolProgresswhere
LogPosition: Format,
Available on crate feature defmt only.
impl Format for SpoolProgresswhere
LogPosition: Format,
defmt only.