pub enum CheckpointPolicy {
PersistAfterAdvance,
AdvanceOnly,
IntervalWhenDrained {
interval: Duration,
},
}Expand description
When to call SourceDriver::persist_checkpoint.
Persistence is always sink-safe only: the runtime never asks a driver to
persist a position past unsunk transform/apply work. Drivers that map the
persist argument to a read-ahead cursor must only do so when the apply window
is drained (see IntervalWhenDrained).
Variants§
PersistAfterAdvance
After each successful sink + advance_watermark,
also call SourceDriver::persist_checkpoint with that position.
AdvanceOnly
Do not call persist_checkpoint (driver folds durability into
advance_watermark).
IntervalWhenDrained
Persist sink-safe positions when the apply window is fully drained (no buffer / in-flight / completed-waiting):
- After an
advance_watermark, if the window is already drained, persist that sink-safe watermark promptly (same durability cadence as persisting last-sunk on sink success). - Otherwise arm a pending watermark and flush once the window drains
and at least
intervalhas elapsed since the last persist. - When drained with no pending advance (filtered-only / idle read
progress), call
SourceDriver::read_progress_for_persiston the same interval so drivers can advance a store cursor through noise without reintroducing unsunk read-ahead.
interval = Duration::ZERO persists whenever the window is drained
(still never advances past unsunk work). On stop flush, any pending
sink-safe position is force-persisted.
Trait Implementations§
Source§impl Clone for CheckpointPolicy
impl Clone for CheckpointPolicy
Source§fn clone(&self) -> CheckpointPolicy
fn clone(&self) -> CheckpointPolicy
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 CheckpointPolicy
Source§impl Debug for CheckpointPolicy
impl Debug for CheckpointPolicy
Source§impl Default for CheckpointPolicy
impl Default for CheckpointPolicy
Source§fn default() -> CheckpointPolicy
fn default() -> CheckpointPolicy
impl Eq for CheckpointPolicy
Source§impl PartialEq for CheckpointPolicy
impl PartialEq for CheckpointPolicy
impl StructuralPartialEq for CheckpointPolicy
Auto Trait Implementations§
impl Freeze for CheckpointPolicy
impl RefUnwindSafe for CheckpointPolicy
impl Send for CheckpointPolicy
impl Sync for CheckpointPolicy
impl Unpin for CheckpointPolicy
impl UnsafeUnpin for CheckpointPolicy
impl UnwindSafe for CheckpointPolicy
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.