1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 18:22:41 +01:00
phorge-phorge/src/applications/drydock
epriestley e9309fdd6a When a Drydock lease schedules a resource to be reclaimed, awaken the lease update task when the reclaim completes
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).

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13210

Differential Revision: https://secure.phabricator.com/D19752
2018-10-26 06:09:52 -07:00
..
application Add Drydock logs to the RepositoryOperation UI 2018-09-15 07:56:35 -07:00
blueprint When leasing a Working Copy in Drydock, just "git reset --hard" so empty repositories work 2018-10-26 06:08:47 -07:00
capability Give Drydock resources a proper expiry mechanism 2015-09-28 09:35:14 -07:00
conduit Allow "drydock.blueprint.edit" to create blueprints 2018-01-04 10:08:07 -08:00
constants Give Drydock Resources more modern status treatment 2018-02-13 13:16:46 -08:00
controller Write a trivial log when starting a repository operation 2018-09-15 07:57:11 -07:00
customfield Convert DrydockBlueprints to EditEngine 2016-03-03 15:21:25 -08:00
editor Allow "drydock.blueprint.edit" to create blueprints 2018-01-04 10:08:07 -08:00
exception Lock resources briefly while acquiring leases on them to prevent acquiring near-death resources 2018-02-13 13:22:13 -08:00
garbagecollector Provide bin/garbage for interacting with garbage collection 2015-10-02 09:17:24 -07:00
interface Make WorkingCopyBlueprint responsible for performing merges 2015-10-26 12:40:16 -07:00
logtype Provide a convenient way to log arbitrary text in Drydock without needing structured log classes 2018-09-15 07:59:50 -07:00
management In "bin/drydock lease", take a JSON "--attributes" so we can accept complex values 2018-10-26 06:09:20 -07:00
operation When applying repository operations via Drydock, provide more context on OperationType 2018-09-06 08:15:16 -07:00
phid Write a trivial log when starting a repository operation 2018-09-15 07:57:11 -07:00
query Add Drydock logs to the RepositoryOperation UI 2018-09-15 07:56:35 -07:00
storage When a Drydock lease schedules a resource to be reclaimed, awaken the lease update task when the reclaim completes 2018-10-26 06:09:52 -07:00
typeahead Render browse results with global result style 2016-06-20 16:49:02 -07:00
view Write a trivial log when starting a repository operation 2018-09-15 07:57:11 -07:00
worker When a Drydock lease schedules a resource to be reclaimed, awaken the lease update task when the reclaim completes 2018-10-26 06:09:52 -07:00
xaction Allow "drydock.blueprint.edit" to create blueprints 2018-01-04 10:08:07 -08:00