MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / try_ship_dataflow

Method try_ship_dataflow

src/adapter/src/coord.rs:4240–4258  ·  view source on GitHub ↗

Call into the compute controller to install a finalized dataflow, and initialize the read policies for its exported readable objects.

(
        &mut self,
        dataflow: DataflowDescription<Plan>,
        instance: ComputeInstanceId,
        target_replica: Option<ReplicaId>,
    )

Source from the content-addressed store, hash-verified

4238 /// Call into the compute controller to install a finalized dataflow, and
4239 /// initialize the read policies for its exported readable objects.
4240 pub(crate) async fn try_ship_dataflow(
4241 &mut self,
4242 dataflow: DataflowDescription<Plan>,
4243 instance: ComputeInstanceId,
4244 target_replica: Option<ReplicaId>,
4245 ) -> Result<(), DataflowCreationError> {
4246 // We must only install read policies for indexes, not for sinks.
4247 // Sinks are write-only compute collections that don't have read policies.
4248 let export_ids = dataflow.exported_index_ids().collect();
4249
4250 self.controller
4251 .compute
4252 .create_dataflow(instance, dataflow, target_replica)?;
4253
4254 self.initialize_compute_read_policies(export_ids, instance, CompactionWindow::Default)
4255 .await;
4256
4257 Ok(())
4258 }
4259
4260 /// Call into the compute controller to allow writes to the specified IDs
4261 /// from the specified instance. Calling this function multiple times and

Callers 2

ship_dataflowMethod · 0.80
implement_copy_toMethod · 0.80

Calls 4

exported_index_idsMethod · 0.80
collectMethod · 0.45
create_dataflowMethod · 0.45

Tested by

no test coverage detected