lease Manager should not evaluate all Leases and all Blocks on every loop()

Bug #1814556 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
John A Meinel
2.5
Fix Released
High
John A Meinel

Bug Description

worker/lease/manager.Manager.loop() currently evaluates all Leases 2x in every step of loop().

Once in nextTick() to figure out when the next tick would be and once in loop() where it checks if there are any blocks to unblock.

However, we should only need to unblock if something expired, and we can compute nextTick once when we evaluate the leases, and then only tick the clock forward a bit if a ClaimLease would cause the most-recent expiry to be newer than the previous most recent.

Revision history for this message
John A Meinel (jameinel) wrote :

https://github.com/juju/juju/pull/9712 is a WIP progress down this path.

Changed in juju:
assignee: nobody → Christian Muirhead (2-xtian)
milestone: none → 2.6-beta1
John A Meinel (jameinel)
Changed in juju:
assignee: Christian Muirhead (2-xtian) → John A Meinel (jameinel)
Revision history for this message
John A Meinel (jameinel) wrote :
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.