pub enum ComputeCommand<T = Timestamp> {
    CreateTimely {
        config: TimelyConfig,
        epoch: ComputeStartupEpoch,
    },
    CreateInstance(LoggingConfig),
    InitializationComplete,
    UpdateConfiguration(BTreeSet<ComputeParameter>),
    CreateDataflows(Vec<DataflowDescription<Plan<T>, CollectionMetadata, T>>),
    AllowCompaction(Vec<(GlobalId, Antichain<T>)>),
    Peek(Peek<T>),
    CancelPeeks {
        uuids: BTreeSet<Uuid>,
    },
}
Expand description

Commands related to the computation and maintenance of views.

A replica can consist of multiple clusterd processes. Upon startup, a clusterd will listen for a connection from environmentd. The first command sent to clusterd must be a CreateTimely command, which will build the timely runtime.

CreateTimely is the only command that is sent to every process of the replica by environmentd. The other commands are sent only to the first process, which in turn will disseminate the command to other timely workers using the timely communication fabric.

After a timely runtime has been built with CreateTimely, a sequence of commands that have to be handled in the timely runtime can be sent: First a CreateInstance must be sent which activates logging sources. After this, any combination of UpdateConfiguration, CreateDataflows, AllowCompaction, Peek, and CancelPeeks can be sent.

Within this sequence, exactly one InitializationComplete has to be sent. Commands sent before InitializationComplete are buffered and are compacted. For example a Peek followed by a CancelPeek will become a no-op if sent before InitializationComplete. After InitializationComplete, the clusterd is considered rehydrated and will immediately act upon the commands. If a new cluster is created, InitializationComplete will follow immediately after CreateInstance. If a replica is added to a cluster or environmentd restarts and rehydrates a clusterd, a potentially long command sequence will be sent before InitializationComplete.

Variants§

§

CreateTimely

Create the timely runtime according to the supplied CommunicationConfig. Must be the first command sent to a clusterd. This is the only command that is broadcasted to all clusterd processes within a replica.

§

CreateInstance(LoggingConfig)

Setup and logging sources within a running timely instance. Must be the second command after CreateTimely.

§

InitializationComplete

Indicates that the controller has sent all commands reflecting its initial state.

§

UpdateConfiguration(BTreeSet<ComputeParameter>)

Update compute instance configuration.

§

CreateDataflows(Vec<DataflowDescription<Plan<T>, CollectionMetadata, T>>)

Create a sequence of dataflows.

Each of the dataflows must contain as_of members that are valid for each of the referenced arrangements, meaning AllowCompaction should be held back to those values until the command. Subsequent commands may arbitrarily compact the arrangements; the dataflow runners are responsible for ensuring that they can correctly maintain the dataflows.

§

AllowCompaction(Vec<(GlobalId, Antichain<T>)>)

Enable compaction in compute-managed collections.

Each entry in the vector names a collection and provides a frontier after which accumulations must be correct. The workers gain the liberty of compacting the corresponding maintained traces up through that frontier.

§

Peek(Peek<T>)

Peek at an arrangement.

§

CancelPeeks

Fields

§uuids: BTreeSet<Uuid>

The identifiers of the peek requests to cancel.

Cancel the peeks associated with the given uuids.

Trait Implementations§

The type of Strategy used to generate values of type Self.
The type of parameters that arbitrary_with accepts for configuration of the generated Strategy. Parameters must implement Default.
Generates a Strategy for producing arbitrary values of type the implementing type (Self). The strategy is passed the arguments given in args. Read more
Generates a Strategy for producing arbitrary values of type the implementing type (Self). Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Sends a command to the dataflow server. Read more
Receives the next response from the dataflow server. Read more
Returns an adapter that treats the client as a stream. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
The type which functions as the state machine for the partitioning.
Construct a PartitionedState for the command–response pair.
Splits a command into multiple partitions.
Absorbs a response from a single partition. Read more
Convert a Self into a Proto value.
Consume and convert a Proto back into a Self value. Read more
Serialize this value into the given Serde serializer. 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.

Converts to this type from a reference to the input type.
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
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Upcasts this ProgressEventTimestamp to Any. Read more
Returns the name of the concrete type of this object. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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