pub struct DagChangelogPropagator { /* private fields */ }Expand description
Per-node changelog buffer management for DAG pipelines.
Wraps a ChangelogBuffer per node, with global and per-node enable flags
for zero-overhead disabled mode.
Implementations§
Source§impl DagChangelogPropagator
impl DagChangelogPropagator
Sourcepub fn from_dag(dag: &StreamingDag, capacity: usize) -> Self
pub fn from_dag(dag: &StreamingDag, capacity: usize) -> Self
Creates a propagator from a finalized DAG with the given buffer capacity.
All nodes start enabled. Use set_node_enabled to selectively disable.
Sourcepub fn disabled(slot_count: usize) -> Self
pub fn disabled(slot_count: usize) -> Self
Creates a disabled propagator (zero overhead).
No buffers are allocated. All record calls return false immediately.
Sourcepub fn record(&mut self, node: NodeId, changelog_ref: ChangelogRef) -> bool
pub fn record(&mut self, node: NodeId, changelog_ref: ChangelogRef) -> bool
Records a changelog reference at a node.
Returns true if the reference was recorded, false if the propagator
is disabled, the node is disabled, or the buffer is full (backpressure).
Sourcepub fn record_retraction(
&mut self,
node: NodeId,
batch_offset: u32,
old_row_index: u32,
new_row_index: u32,
) -> bool
pub fn record_retraction( &mut self, node: NodeId, batch_offset: u32, old_row_index: u32, new_row_index: u32, ) -> bool
Records a retraction pair (update-before + update-after) at a node.
Returns true if both references were recorded.
Sourcepub fn drain_node(&mut self, node: NodeId) -> Vec<ChangelogRef>
pub fn drain_node(&mut self, node: NodeId) -> Vec<ChangelogRef>
Drains all changelog references from a node’s buffer.
Returns the drained references. The buffer is cleared but retains capacity.
Sourcepub fn has_pending(&self) -> bool
pub fn has_pending(&self) -> bool
Returns true if any node has pending changelog references.
Sourcepub fn pending_count(&self, node: NodeId) -> usize
pub fn pending_count(&self, node: NodeId) -> usize
Returns the number of pending changelog references at a node.
Sourcepub fn set_node_enabled(&mut self, node: NodeId, enabled: bool)
pub fn set_node_enabled(&mut self, node: NodeId, enabled: bool)
Enables or disables changelog recording for a specific node.
Sourcepub fn set_globally_enabled(&mut self, enabled: bool)
pub fn set_globally_enabled(&mut self, enabled: bool)
Enables or disables changelog recording globally.
Sourcepub fn is_globally_enabled(&self) -> bool
pub fn is_globally_enabled(&self) -> bool
Returns whether changelog recording is globally enabled.
Sourcepub fn slot_count(&self) -> usize
pub fn slot_count(&self) -> usize
Returns the number of node slots.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DagChangelogPropagator
impl RefUnwindSafe for DagChangelogPropagator
impl Send for DagChangelogPropagator
impl Sync for DagChangelogPropagator
impl Unpin for DagChangelogPropagator
impl UnsafeUnpin for DagChangelogPropagator
impl UnwindSafe for DagChangelogPropagator
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more