pub struct WriteLoopConfig {
pub flush_period: Duration,
pub append_timeout: Duration,
pub flush_timeout: Duration,
pub drain_per_sample_timeout: Duration,
pub drain_total_budget: Duration,
pub shutdown_flush_timeout: Duration,
}Expand description
Tunables for write_loop_with_config. Production uses the
defaults via write_loop; tests dial the timeouts down to
sub-second values so failure-injection cases finish in a few
hundred milliseconds instead of minutes.
Fields§
§flush_period: DurationHow often to call flush_ingest_writes and commit the
pending last_event timestamps to the registry.
append_timeout: DurationBound on how long write_loop waits for a single
append_event_with_meta JoinHandle. On timeout the sample
is logged as abandoned-but-may-succeed-late and the loop
moves on (the spawn_blocking task remains parked on the
blocking pool — per-PV serialization in PlainPB keeps any
late completion ordered behind subsequent same-PV samples).
flush_timeout: DurationBound on how long write_loop waits for one
flush_ingest_writes JoinHandle during the periodic flush.
On timeout, every pending ts_updates entry is deferred to
the next cycle (we don’t know which PVs reached disk).
drain_per_sample_timeout: DurationBound on each individual append issued during the shutdown drain.
drain_total_budget: DurationTotal wall-clock budget for the shutdown drain. Once exceeded, remaining buffered samples are abandoned without even attempting an append, so a wedged STS can’t stretch an orderly stop into “kill -9”.
shutdown_flush_timeout: DurationBound on the final flush_writes issued at shutdown.
Trait Implementations§
Source§impl Clone for WriteLoopConfig
impl Clone for WriteLoopConfig
Source§fn clone(&self) -> WriteLoopConfig
fn clone(&self) -> WriteLoopConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more