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

Method shutdown

src/compute-client/src/controller/instance.rs:1077–1087  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1075 /// Soft-panics if the compute instance still has active replicas.
1076 #[mz_ore::instrument(level = "debug")]
1077 pub fn shutdown(&mut self) {
1078 // Taking the `command_rx` ensures that the [`Instance::run`] loop terminates.
1079 let (_tx, rx) = mpsc::unbounded_channel();
1080 self.command_rx = rx;
1081
1082 let stray_replicas: Vec<_> = self.replicas.keys().collect();
1083 soft_assert_or_log!(
1084 stray_replicas.is_empty(),
1085 "dropped instance still has provisioned replicas: {stray_replicas:?}",
1086 );
1087 }
1088
1089 /// Terminate the [`Instance::run`] loop, causing the instance task to shut down.
1090 ///

Callers 6

handle_connectionMethod · 0.45
drop_instanceMethod · 0.45
run_appendFunction · 0.45
handle_connectionMethod · 0.45
cancel_requestFunction · 0.45
handle_connectionMethod · 0.45

Calls 2

collectMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected