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>,
)
| 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 |
no test coverage detected