pub struct MutationBatch {
pub span: Span,
pub mutations: SmallVec<[Mutation; 6]>,
pub slot_context: Option<SlotContext>,
pub event_context: Option<EventContext>,
pub flush_ack: Option<Sender<()>>,
/* private fields */
}Expand description
Envelope type that carries mutations along with their originating span context.
This enables trace context propagation across the mpsc channel boundary from the Vixen parser to the Projector.
Fields§
§span: SpanThe span from which these mutations originated
mutations: SmallVec<[Mutation; 6]>The mutations to process
slot_context: Option<SlotContext>Slot context for ordering (optional for backward compatibility)
event_context: Option<EventContext>Event metadata for logging and diagnostics
flush_ack: Option<Sender<()>>When set, this batch is a flush marker: the projector acknowledges it after every batch queued before it has been applied to the caches. Used by the snapshot manager to establish a consistency cut.
Implementations§
Source§impl MutationBatch
impl MutationBatch
pub fn new(mutations: SmallVec<[Mutation; 6]>) -> Self
pub fn with_span(span: Span, mutations: SmallVec<[Mutation; 6]>) -> Self
pub fn with_slot_context( mutations: SmallVec<[Mutation; 6]>, slot_context: SlotContext, ) -> Self
Sourcepub fn flush_marker(ack: Sender<()>) -> Self
pub fn flush_marker(ack: Sender<()>) -> Self
An empty batch whose only purpose is to be acknowledged once the projector has drained everything queued before it.
Sourcepub fn with_snapshot_guard(self, guard: SnapshotProcessingGuard) -> Self
pub fn with_snapshot_guard(self, guard: SnapshotProcessingGuard) -> Self
Transfer a VM processing guard to this batch. The projector retains it until cache application and watermark advancement are complete.