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

Method create_cluster

src/controller/src/clusters.rs:410–420  ·  view source on GitHub ↗

Creates a cluster with the specified identifier and configuration. A cluster is a combination of a storage instance and a compute instance. A cluster has zero or more replicas; each replica colocates the storage and compute layers on the same physical resources.

(
        &mut self,
        id: ClusterId,
        config: ClusterConfig,
    )

Source from the content-addressed store, hash-verified

408 /// A cluster has zero or more replicas; each replica colocates the storage
409 /// and compute layers on the same physical resources.
410 pub fn create_cluster(
411 &mut self,
412 id: ClusterId,
413 config: ClusterConfig,
414 ) -> Result<(), anyhow::Error> {
415 self.storage
416 .create_instance(id, config.workload_class.clone());
417 self.compute
418 .create_instance(id, config.arranged_logs, config.workload_class)?;
419 Ok(())
420 }
421
422 /// Updates the workload class for a cluster.
423 ///

Callers 2

bootstrapMethod · 0.45

Calls 2

create_instanceMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected