You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(lease): release held leases orphaned by a daemon restart
A held lease's liveness is its daemon connection, so any held lease
still persisted at startup is orphaned by definition -- yet
StartupConverger.converge() re-armed its TTL timer anyway, parking the
device for up to a full heldTtlBackstopMs with no holder.
StartupConverger now releases every held lease (reason "orphaned")
through the normal release path before timers are restored and before
running-capacity convergence, so the freed device is reclaimed and
visible to both. Detached leases are untouched -- their liveness is
the TTL, not a connection -- and keep today's restored timer.
The release capability is injected as a narrow OrphanedLeaseRelease
port, wired in LeaseEngine to the existing LeaseReleaseCoordinator, in
the same style as the converger's existing LeaseTimerRestorer and
InterruptedReclaimRecovery neighbours.
Closes#13
Copy file name to clipboardExpand all lines: docs/EVENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ in short: `subject.past-tense-fact`, emitted post-commit, facts not commands.
15
15
|`lease.queued`| request id, queue position | no capacity; request entered the wait queue | LeaseAcquisitionCoordinator | implemented |
16
16
|`lease.granted`| lease id, device id, requester, mode (held/detached) | a device was assigned and handed out | LeaseLifecycle | implemented |
17
17
|`lease.renewed`| lease id, new deadline | detached-mode renew succeeded, **or** a held-mode connection that declared the `heartbeat` capability answered a `lease.heartbeat` push (fires once per lease per `lease.heartbeatIntervalMs` while the holder stays alive) | LeaseLifecycle | implemented |
|`lease.released`| lease id, device id, reason (closed/explicit/killed/orphaned) | holder connection closed, explicit release, or (orphaned) a `held` lease found still persisted at daemon startup, which cannot have a live holder across a restart| LeaseLifecycle | implemented |
19
19
|`lease.expired`| lease id, device id | TTL backstop fired without a heartbeat sliding it first — for a capability-declaring holder this means it stopped ponging (crashed, hung, or lost its socket); for one that never declared the capability it means the grant-time TTL (or the last explicit `pitlane lease renew`) simply ran out, exactly as before this change | LeaseLifecycle | implemented |
20
20
|`lease.rejected`| request spec, reason (timeout/no-wait/unresolvable-spec/already-leased/boot-timeout/killed) | a request ended without a grant | LeaseAcquisitionCoordinator / WaitQueue | implemented |
0 commit comments