Struct mz_compute_client::command::ComputeCommandHistory
source · pub struct ComputeCommandHistory<T = Timestamp> {
reduced_count: usize,
commands: Vec<ComputeCommand<T>>,
dataflow_count: usize,
}
Fields§
§reduced_count: usize
The number of commands at the last time we compacted the history.
commands: Vec<ComputeCommand<T>>
The sequence of commands that should be applied.
This list may not be “compact” in that there can be commands that could be optimized or removed given the context of other commands, for example compaction commands that can be unified, or dataflows that can be dropped due to allowed compaction.
dataflow_count: usize
The number of dataflows in the compute command history.
Implementations§
source§impl<T: Timestamp> ComputeCommandHistory<T>
impl<T: Timestamp> ComputeCommandHistory<T>
sourcepub fn push<V>(&mut self, command: ComputeCommand<T>, peeks: &HashMap<Uuid, V>)
pub fn push<V>(&mut self, command: ComputeCommand<T>, peeks: &HashMap<Uuid, V>)
Add a command to the history.
This action will reduce the history every time it doubles while retaining the provided peeks.
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Obtains the length of this compute command history in number of commands.
sourcepub fn dataflow_count(&self) -> usize
pub fn dataflow_count(&self) -> usize
Obtains the number of dataflows in this compute command history.
sourcepub fn reduce(&mut self)
pub fn reduce(&mut self)
Reduces self.history
to a minimal form.
This action not only simplifies the issued history, but importantly reduces the instructions to only reference inputs from times that are still certain to be valid. Commands that allow compaction of a collection also remove certainty that the inputs will be available for times not greater or equal to that compaction frontier.
sourcepub fn retain_peeks<V>(&mut self, peeks: &HashMap<Uuid, V>)
pub fn retain_peeks<V>(&mut self, peeks: &HashMap<Uuid, V>)
Retain only those peeks present in peeks
and discard the rest.
sourcepub fn iter(&self) -> impl Iterator<Item = &ComputeCommand<T>>
pub fn iter(&self) -> impl Iterator<Item = &ComputeCommand<T>>
Iterate through the contained commands.
Trait Implementations§
source§impl<T: Debug> Debug for ComputeCommandHistory<T>
impl<T: Debug> Debug for ComputeCommandHistory<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for ComputeCommandHistory<T>where
T: RefUnwindSafe,
impl<T> Send for ComputeCommandHistory<T>where
T: Send,
impl<T> Sync for ComputeCommandHistory<T>where
T: Sync,
impl<T> Unpin for ComputeCommandHistory<T>where
T: Unpin,
impl<T> UnwindSafe for ComputeCommandHistory<T>where
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.