pub struct SnapshotCadence {
pub every_entries: i64,
pub poll_interval: Duration,
}Expand description
How often the maintenance task writes an anchor (§5.5).
§5.5 specifies “every 10,000 log entries”, which is a distance rather than a schedule — the point is to bound how much delta a reconstruction has to fold, and delta is measured in log entries, not seconds. An idle database therefore writes nothing at all, however long it stays open.
poll_interval is how often that distance is checked, and it is the part
§5.5 does not specify because it is an implementation cost rather than a
property: the check is SELECT MAX(seq_id), an index lookup on an integer
primary key, so the interval trades a negligible read against how promptly a
burst of writes is noticed.
Fields§
§every_entries: i64Write an anchor once the log has grown this many entries past the last.
poll_interval: DurationHow often to compare the log’s head against the last anchor.
Trait Implementations§
Source§impl Clone for SnapshotCadence
impl Clone for SnapshotCadence
Source§fn clone(&self) -> SnapshotCadence
fn clone(&self) -> SnapshotCadence
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 SnapshotCadence
Source§impl Debug for SnapshotCadence
impl Debug for SnapshotCadence
Source§impl Default for SnapshotCadence
impl Default for SnapshotCadence
impl Eq for SnapshotCadence
Source§impl PartialEq for SnapshotCadence
impl PartialEq for SnapshotCadence
impl StructuralPartialEq for SnapshotCadence
Auto Trait Implementations§
impl Freeze for SnapshotCadence
impl RefUnwindSafe for SnapshotCadence
impl Send for SnapshotCadence
impl Sync for SnapshotCadence
impl Unpin for SnapshotCadence
impl UnsafeUnpin for SnapshotCadence
impl UnwindSafe for SnapshotCadence
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request