pub struct DeltaPolicy {
pub max_chain_len: usize,
pub max_byte_ratio: f64,
}Expand description
Delta-checkpoint chain policy (R0.7 wave 4): when an opting-in backend rewrites a boundary as a full snapshot instead of another chain link.
Both bounds exist to keep resume reads bounded. An unbounded delta chain makes every resume an O(chain) fold — the event-sourcing failure mode checkpoints exist to avoid (checkpoints, not journals, are the resume authority). The bound is enforced at write time and is a policy, never a correctness condition: readers fold whatever chain they find.
Fields§
§max_chain_len: usizeMaximum number of consecutive delta links above a full snapshot. A
put that would exceed it writes a full snapshot instead, so resume
folds at most max_chain_len channel-sets. Default: 32.
max_byte_ratio: f64Full-snapshot threshold as a fraction of the full state’s serialized size: when a delta’s serialized size reaches this share of the state it would replace, the delta has stopped paying for itself — it costs nearly a full write and extends the chain — so a full snapshot is written instead. Default: 0.8.