do the export dataflow thing
(
timely_worker: &mut TimelyWorker,
storage_state: &mut StorageState,
id: GlobalId,
description: StorageSinkDesc<CollectionMetadata, mz_repr::Timestamp>,
)
| 437 | |
| 438 | /// do the export dataflow thing |
| 439 | pub fn build_export_dataflow( |
| 440 | timely_worker: &mut TimelyWorker, |
| 441 | storage_state: &mut StorageState, |
| 442 | id: GlobalId, |
| 443 | description: StorageSinkDesc<CollectionMetadata, mz_repr::Timestamp>, |
| 444 | ) { |
| 445 | let worker_logging = timely_worker.logger_for("timely").map(Into::into); |
| 446 | let debug_name = id.to_string(); |
| 447 | let name = format!("Source dataflow: {debug_name}"); |
| 448 | timely_worker.dataflow_core(&name, worker_logging, Box::new(()), |_, scope| { |
| 449 | let scope = scope.with_label(); |
| 450 | |
| 451 | let mut tokens = vec![]; |
| 452 | let (health_stream, sink_tokens) = |
| 453 | crate::render::sinks::render_sink(scope, storage_state, id, &description); |
| 454 | tokens.extend(sink_tokens); |
| 455 | |
| 456 | // Note that sinks also have only 1 active worker, which simplifies the work that |
| 457 | // `health_operator` has to do internally. |
| 458 | let health_token = crate::healthcheck::health_operator( |
| 459 | scope, |
| 460 | storage_state.now.clone(), |
| 461 | [id].into_iter().collect(), |
| 462 | id, |
| 463 | "sink", |
| 464 | health_stream, |
| 465 | crate::healthcheck::DefaultWriter { |
| 466 | command_tx: storage_state.internal_cmd_tx.clone(), |
| 467 | updates: Rc::clone(&storage_state.shared_status_updates), |
| 468 | }, |
| 469 | storage_state |
| 470 | .storage_configuration |
| 471 | .parameters |
| 472 | .record_namespaced_errors, |
| 473 | dyncfgs::STORAGE_SUSPEND_AND_RESTART_DELAY |
| 474 | .get(storage_state.storage_configuration.config_set()), |
| 475 | ); |
| 476 | tokens.push(health_token); |
| 477 | |
| 478 | storage_state.sink_tokens.insert(id, tokens); |
| 479 | }); |
| 480 | } |
| 481 | |
| 482 | pub(crate) fn build_oneshot_ingestion_dataflow( |
| 483 | timely_worker: &mut TimelyWorker, |
no test coverage detected