Enum mz_persist::indexed::Cmd
source · [−]pub enum Cmd {
Register(String, (String, String), PFutureHandle<Id>),
Destroy(String, PFutureHandle<bool>),
Write(Vec<(Id, ColumnarRecords)>, PFutureHandle<SeqNo>),
Seal(Vec<Id>, u64, PFutureHandle<SeqNo>),
AllowCompaction(Vec<(Id, Antichain<u64>)>, PFutureHandle<SeqNo>),
Maintenance(MaintenanceRes),
Read(CmdRead),
}
Expand description
An input to the persist state machine.
Variants
Register(String, (String, String), PFutureHandle<Id>)
Creates, if necessary, a new unsealed and trace with the given external stream name, returning the corresponding internal stream id.
This is idempotent: names may be registered multiple times.
Destroy(String, PFutureHandle<bool>)
Removes a stream from the index.
This is idempotent and may be called multiple times. It returns true if the stream was destroyed from this call, and false if it was already destroyed.
Write(Vec<(Id, ColumnarRecords)>, PFutureHandle<SeqNo>)
Asynchronously persists (Key, Value, Time, i64) updates for the stream with the given id.
Seal(Vec<Id>, u64, PFutureHandle<SeqNo>)
Sealing a time advances the “sealed” frontier for an id, which restricts
what times can later be sealed and written for that id. See
sealed_frontier
for details.
AllowCompaction(Vec<(Id, Antichain<u64>)>, PFutureHandle<SeqNo>)
Permit compaction of updates at times <= since to since.
The compaction frontier can never decrease and it is an error to call this function with a since argument that is less than the current compaction frontier.
While it may seem counter-intuitive to advance the compaction frontier
past the seal frontier, this is perfectly valid. It can happen when
joining updates from one stream to updates from another stream, and we
already know that the other stream is compacted further along. Allowing
compaction on this, the first stream, then is saying that we are fine
with losing historical detail, and that we already allow compaction of
updates that are yet to come because we don’t need them at their full
resolution. A similar case is when we know that any outstanding queries
have an as_of
that is in the future of the seal: we can also
pro-actively allow compaction of updates that did not yet arrive.
Maintenance(MaintenanceRes)
A response from a previously sent maintenance request.
Read(CmdRead)
A read-only input to the persist state machine.
Implementations
sourceimpl Cmd
impl Cmd
sourcepub fn fill_err_runtime_shutdown(self)
pub fn fill_err_runtime_shutdown(self)
Fills self’s response, if applicable, with Error::RuntimeShutdown.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Cmd
impl Send for Cmd
impl Sync for Cmd
impl Unpin for Cmd
impl !UnwindSafe for Cmd
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FutureExt for T
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T
in a tonic::Request
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more