Recovery paths¶
Recovery in the control plane is a set of controllers that run every cycle, each reconciling one thing that can be left behind. The loops that recover are the loops that run normally, so recovery is the ordinary path rather than a mode.
Five recovery controllers¶
| Controller | Recovers |
|---|---|
| Recoverable runs | Runs left queued or running across a restart |
| Dataplane assignment leases | Assignments whose leases lapsed |
| Dataplane cold start | Nodes coming back and converging their phase |
| Retry and timeout | Runs that failed or expired |
| Assignment plane convergence | Assignments, runs, builds and models that stopped converging |
Each is bounded per cycle, so recovery proceeds over cycles rather than as one sweep that would make a cycle's cost unpredictable.
The recovery controllers¶
flowchart LR
subgraph CTL["RECOVERY CONTROLLERS, every cycle, bounded"]
direction TB
RR["Recoverable runs"]
LS["Assignment leases"]
CS["Cold start"]
RT["Retry and timeout"]
CV["Convergence"]
end
subgraph ST["STORE"]
direction TB
RUNS[("Runs<br/>recovery mark")]
EVS[("Run event streams<br/>run.recovered")]
ASG[("Assignments<br/>expired")]
NODES[("Node phase state")]
end
RR --> RUNS
RR --> EVS
LS --> ASG
CS --> NODES
RT --> RUNS
CV --> ASG
CV --> RUNS
Each controller writes to the records it recovers and nowhere else, and every record it touches is in the store. A node's identity and assignment cursor are outside this diagram, on the node's volume, and the node reads them back itself.
Run recovery marks rather than restarts¶
Recovery records that a run was recovered and what status it was in at the
time, and appends a run.recovered event to the run's own event stream. A run
already carrying a recovery mark is skipped, so a repeated cycle does not
re-mark it.
The event is why recovery is visible afterwards. A run that went through a control-plane restart says so in its own history rather than being indistinguishable from one that did not.
Lease recovery releases work¶
An assignment whose lease lapsed is requeued, and the cycle reports how many:
A rising count means nodes are losing leases faster than they renew them, which is the signature of a flapping link rather than a clean outage. See Detecting a control plane link break.
Recovery is idempotent by construction¶
Every recovery controller reconciles toward a desired state, so running it again converges rather than repeating work. That property is what allows recovery to run every cycle instead of being triggered.
It is also why a failover costs a partially completed cycle rather than a corrupted one. See Leadership and failover.
What the node and the kernel recover themselves¶
Node-local state. A node reads its identity and assignment cursor back from its volume. Its local lease state and spools belong to the process and start empty in a new one; the leases that decide ownership are the ledger records this diagram shows.
Kernel evidence. The kernel keeps its own append-only continuity store and the node resumes from its acknowledged sequence.
The control plane recovers its own view and releases work that is no longer held. See Recovering the control plane link.
Recovery from a lost store is a different path¶
These controllers recover from a restart, not from losing the store itself. Restoring a control plane, sequencing the restore, and certifying completion is a disaster recovery procedure with its own preconditions and gates. See Backup and disaster recovery.