Skip to content
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# many different editing tools:
#
# https://github.com/github/gitignore/tree/master/Global

.idea/
/target
/target-ra
/target-xcompile
Expand Down
21 changes: 21 additions & 0 deletions src/adapter/src/coord/sequencer/linked_cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ use mz_repr::GlobalId;
use mz_sql::catalog::CatalogCluster;
use mz_sql::names::QualifiedItemName;
use mz_sql::plan::SourceSinkClusterConfig;
use tracing::{event, warn, Level};

use crate::catalog::{self, ClusterConfig, ClusterVariant, LINKED_CLUSTER_REPLICA_NAME};
use crate::coord::Coordinator;
use crate::error::AdapterError;
use crate::session::Session;


impl Coordinator {
/// Generates the catalog operations to create a linked cluster for the
/// source or sink with the given name.
Expand Down Expand Up @@ -202,11 +204,30 @@ impl Coordinator {
// `catalog_transact`, both from the catalog state and from the
// controller. The new replicas will be in the catalog state, and
// need to be recreated in the controller.

let replicas: Vec<_> = cluster
.replicas()
.map(|r| (r.cluster_id, r.replica_id))
.collect();
self.create_cluster_replicas(&replicas).await;
}
}

pub fn my_func_test(
scx: &StatementContext
) -> Result<Plan, PlanError> {
//warn!("Logging test");
scx.require_feature_flag(&crate::session::vars::ENABLE_ASSERT_NOT_NULL)?;
Ok()
}
}

#[cfg(test)]
mod tests {
use super::*;

#[mz_ore::test]
fn simple_test() {
assert_eq!(2 + 2, 4);
}
}
4 changes: 2 additions & 2 deletions test/restart/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,10 @@ def workflow_bound_size_mz_status_history(c: Composition) -> None:
service="testdrive_no_reset",
input=dedent(
"""
> SELECT COUNT(*) > 7 FROM mz_internal.mz_source_status_history
> SELECT COUNT(*) > 8 FROM mz_internal.mz_source_status_history
true

> SELECT COUNT(*) > 7 FROM mz_internal.mz_sink_status_history
> SELECT COUNT(*) > 8 FROM mz_internal.mz_sink_status_history
true
"""
),
Expand Down