diff --git a/hive-c0re/src/coordinator.rs b/hive-c0re/src/coordinator.rs index d03ec18a..4b9e1366 100644 --- a/hive-c0re/src/coordinator.rs +++ b/hive-c0re/src/coordinator.rs @@ -1254,16 +1254,18 @@ impl Coordinator { map.iter().map(|(k, v)| (k.clone(), v.len())).collect() } - /// Set a transient state and return a guard that clears it on drop. - /// Use this from any path where the surrounding future could be - /// cancelled or panic between set and clear (HTTP handlers, spawned - /// tasks). The guard's `Drop` runs even on task cancellation, so - /// the dashboard's spinner can't get pinned forever. + /// Tell the crash watcher that `name`'s container is going down **on + /// purpose**, for the lifetime of the returned guard. See + /// [`CrashWatchSuppression`] for why this exists at all. /// - /// `label` is what the pill renders; `deliberate_stop` says whether this - /// operation takes the container down on purpose, and is what the crash - /// watcher reads. Only the caller knows the second one — it is not - /// recoverable from the first. + /// Only for the operations with no queue node behind them. Anything the + /// job queue runs answers this from the node itself + /// ([`crate::job_queue::NodeKind::takes_container_down`]) and must not come + /// through here. + /// + /// The guard's `Drop` runs even on task cancellation, so an aborted HTTP + /// request or a panic mid-destroy can't leave a container permanently + /// exempt from crash reporting. pub fn suppress_crash_watch(self: &Arc, name: &str) -> CrashWatchSuppression { self.crash_suppressed .lock()