Page MenuHomePhabricator

When a Drydock lease schedules a resource to be reclaimed, awaken the lease update task when the reclaim completes
ClosedPublic

Authored by epriestley on Oct 24 2018, 2:59 PM.
Tags
None
Referenced Files
F13052171: D19752.diff
Fri, Apr 19, 7:35 AM
F13050475: D19752.diff
Fri, Apr 19, 2:55 AM
Unknown Object (File)
Wed, Apr 10, 7:10 PM
Unknown Object (File)
Tue, Apr 2, 11:21 PM
Unknown Object (File)
Mar 20 2024, 10:30 PM
Unknown Object (File)
Mar 20 2024, 10:30 PM
Unknown Object (File)
Mar 9 2024, 3:38 AM
Unknown Object (File)
Feb 3 2024, 7:40 PM
Subscribers
Restricted Owners Package

Details

Summary

Depends on D19751. Ref T13210. When Drydock needs to reclaim an existing unused resource in order to build a new resource to satisfy a lease, the lease which triggered the reclaim currently gets thrown back into the pool with a 15-second yield.

If the queue is pretty empty and the reclaim is quick, this can mean that we spend up to 15 extra seconds just waiting for the lease update task to get another shot at building a resource (the resource reclaim may complete in a second or two, but nothing else happens until the yield ends).

Instead, when a lease triggers a reclaim, have the reclaim reawaken the lease task when it completes. In the best case, this saves us 15 seconds of waiting. In other cases (the task already completed some other way, the resource gets claimed before the lease gets to it), it's harmless.

Test Plan
  • Allocated A, A, A working copies with limit 3. Leased a B working copy.
  • Before patch: allocation took ~32 seconds.
  • After patch: allocation takes ~17 seconds (i.e., about 15 seconds less).

Diff Detail

Repository
rP Phabricator
Branch
drydock3
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21044
Build 28597: Run Core Tests
Build 28596: arc lint + arc unit