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

Method drop_instance

src/compute-client/src/controller.rs:591–600  ·  view source on GitHub ↗

Remove a compute instance. # Panics Panics if the identified `instance` still has active replicas.

(&mut self, id: ComputeInstanceId)

Source from the content-addressed store, hash-verified

589 ///
590 /// Panics if the identified `instance` still has active replicas.
591 pub fn drop_instance(&mut self, id: ComputeInstanceId) {
592 if let Some(instance) = self.instances.remove(&id) {
593 instance.call(|i| i.shutdown());
594 }
595
596 self.instance_workload_classes
597 .lock()
598 .expect("lock poisoned")
599 .remove(&id);
600 }
601
602 /// Returns the compute controller's config set.
603 pub fn dyncfg(&self) -> &Arc<ConfigSet> {

Callers 1

drop_clusterMethod · 0.45

Calls 5

expectMethod · 0.80
lockMethod · 0.80
removeMethod · 0.45
callMethod · 0.45
shutdownMethod · 0.45

Tested by

no test coverage detected