Require executing authority for lease renewal.
RenewLease now demands current durable authority, AttemptExecuting, and a non-terminal phase so a live lease cannot be extended after authority loss. Align the mutable API renew prose with that precondition.
This commit is contained in:
parent
75fd30674e
commit
0834f291d9
1 changed files with 11 additions and 5 deletions
|
|
@ -307,9 +307,13 @@ ActivateAttempt(a) ==
|
|||
resumedFromCheckpoint, stageState, pendingOutcome>>
|
||||
|
||||
RenewLease(a) ==
|
||||
LET w == attemptWorker[a]
|
||||
LET j == JobOf(a)
|
||||
w == attemptWorker[a]
|
||||
IN /\ leaseState[a] = LeaseLive
|
||||
/\ leaseAge[a] > 0
|
||||
/\ CurrentAuthority(a)
|
||||
/\ attemptState[a] = AttemptExecuting
|
||||
/\ phase[j] \notin TerminalPhases
|
||||
/\ workerState[w] = WorkerUp
|
||||
/\ CanReach(w, CoordSvc)
|
||||
/\ leaseAge' = [leaseAge EXCEPT ![a] = 0]
|
||||
|
|
|
|||
Loading…
Reference in a new issue