hive-jobq: treat a panicking job runner as a failed node
The future `Scheduler::claim_next` hands back completed its node only
after `run`'s future returned. A panic while running (the workspace
unwinds) skipped that completion, so the node stayed `Running` and its
resource units stayed held until the process restarted; later nodes
needing the same resource never started.
The run future is now polled under `catch_unwind`. A panic completes
the node as `Outcome::Failed("runner panicked: <msg>")` with nothing
grown, through the same `complete_growing` path as an ordinary failure:
`AFTER_OK` dependents are skipped, pending children cascade, and the
node's units are released.
The node's future is boxed: wrapping it inline pushed the futures
swarm-controller and hive-c0re spawn over clippy's `large_futures`
limit.
Closes #5058
This commit is contained in:
parent
7c16212fdd
commit
d1ee3d8cc5
2 changed files with 79 additions and 3 deletions
|
|
@ -59,7 +59,8 @@ finished_at, error }`. All fields public; derives serde for the wire
|
|||
(acquiring resources atomically), `complete(id, outcome)` reports a finished
|
||||
node's result and rolls terminality up the parent chain, releasing grants once
|
||||
a subtree is done. `Outcome::{Done, Failed(String)}` — the failure reason
|
||||
rides `Failed` onto the node's `error`.
|
||||
rides `Failed` onto the node's `error`. A runner that panics completes its node as
|
||||
`Failed` with the panic message, which releases its grants like any failure.
|
||||
- **`ResourceTable<R>`** — per-name capacities; unconfigured names default to
|
||||
capacity 1.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue