pub enum Cmd {
    Register(String(String, String)PFutureHandle<Id>),
    Destroy(StringPFutureHandle<bool>),
    Write(Vec<(Id, ColumnarRecords)>, PFutureHandle<SeqNo>),
    Seal(Vec<Id>, u64PFutureHandle<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(StringPFutureHandle<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>, u64PFutureHandle<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

Fills self’s response, if applicable, with Error::RuntimeShutdown.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more

Attaches the current Context to this type, returning a WithContext wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Wrap the input message T in a tonic::Request

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more