(&mut self)
| 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 | /// |
no test coverage detected