pub struct ReviewRetention { /* private fields */ }Expand description
Operator-selected bound for live review detail retained in memory.
Complete reviews older than max_live are archived immediately. An
incomplete review is never archived unless lapse_after is explicitly
set, because choosing when an unanswered review is abandoned is policy,
not a harmless memory optimization.
Implementations§
Source§impl ReviewRetention
impl ReviewRetention
Sourcepub const fn keep(max_live: usize) -> Self
pub const fn keep(max_live: usize) -> Self
Retains at most max_live live reviews when enough reviews are
complete and therefore safe to archive. Incomplete reviews never
lapse under this configuration.
Sourcepub const fn lapse_incomplete_after(self, age: Duration) -> Self
pub const fn lapse_incomplete_after(self, age: Duration) -> Self
Allows an over-limit incomplete review to lapse after age since
this node observed its request.
The op log has no timestamp, so reviews replayed at startup begin a
fresh grace period. Restarting can delay a lapse, never make one
happen early. The emitted ArchiveReview { lapsed: true } op is
persisted, so replicas replay the decision rather than their clocks.
Trait Implementations§
Source§impl Clone for ReviewRetention
impl Clone for ReviewRetention
Source§fn clone(&self) -> ReviewRetention
fn clone(&self) -> ReviewRetention
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReviewRetention
impl Debug for ReviewRetention
Source§impl PartialEq for ReviewRetention
impl PartialEq for ReviewRetention
Source§fn eq(&self, other: &ReviewRetention) -> bool
fn eq(&self, other: &ReviewRetention) -> bool
self and other values to be equal, and is used by ==.