#[repr(u8)]pub enum Durability {
Sync = 1,
Batched = 2,
Buffered = 3,
}Expand description
Re-export of weir_core::Durability so the common producer path needs a
single crate import (weir_client::Durability).
Durability tier requested by the producer for a given record.
Wire values are fixed and must not change without a WIRE_VERSION bump.
Sync and Batched carry the same durability guarantee today: the
record is written and fdatasynced — as part of one batch-boundary group
fsync — before the ACK is sent, so an ack means the bytes are on stable
storage and replay after a crash. They remain distinct wire values for
historical and forward-compatibility reasons (originally Sync fsynced once
per record and Batched once per batch; both now share the batch-boundary
group fsync — see docs/architecture.md). Buffered trades durability for
latency: it acks before any fsync.
Variants§
Sync = 1
Durable before ACK: written and fdatasynced (via the batch-boundary
group fsync) before the ACK — on stable storage, replays after a crash.
Batched = 2
Durable before ACK — the same guarantee as Durability::Sync today:
written and fdatasynced at the batch boundary before the ACK.
(Historically Batched deferred fsync to the batch boundary while Sync
fsynced per record; both now share the batch-boundary group fsync.)
Buffered = 3
Memory write only. ACK is sent after the record enters the in-memory queue.
Trait Implementations§
Source§impl Clone for Durability
impl Clone for Durability
Source§fn clone(&self) -> Durability
fn clone(&self) -> Durability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Durability
Source§impl Debug for Durability
impl Debug for Durability
Source§impl Display for Durability
impl Display for Durability
impl Eq for Durability
Source§impl PartialEq for Durability
impl PartialEq for Durability
Source§fn eq(&self, other: &Durability) -> bool
fn eq(&self, other: &Durability) -> bool
self and other values to be equal, and is used by ==.