Enum persist::indexed::Cmd [−][src]
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, Diff) 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)
Tuple Fields
A response from a previously sent maintenance request.
Read(CmdRead)
Tuple Fields
0: CmdRead
A read-only input to the persist state machine.
Implementations
Fills self’s response, if applicable, with Error::RuntimeShutdown.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Cmd
impl !UnwindSafe for Cmd
Blanket Implementations
Mutably borrows from an owned value. Read more
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