docs(#2815): fix suppress_crash_watch's stale doc comment
The doc still described a `label`/`deliberate_stop` parameter pair inherited from `transient_guard`, which this function replaced and whose signature it does not share — it only takes `name`. Rewritten to say what it does and, more usefully, what must not come through it: the queue answers the same question from the node itself via `NodeKind::takes_container_down`, so this path is only for the two operations that have no node behind them yet.
This commit is contained in:
parent
7f920718f2
commit
ff2721cc0f
1 changed files with 11 additions and 9 deletions
|
|
@ -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<Self>, name: &str) -> CrashWatchSuppression {
|
||||
self.crash_suppressed
|
||||
.lock()
|
||||
|
|
|
|||
Loading…
Reference in a new issue