1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-09 16:32:39 +01:00
phorge-phorge/resources/sql
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
..
autopatches 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
patches Remove a very old Herald garbage collection migration 2018-01-26 10:54:37 -08:00
quickstart.sql Revert quickstart for tables with native FULLTEXT indexes to MyISAM 2017-09-12 12:24:23 -07:00
stopwords.txt Provide a setup warning about using the default MySQL stopword file 2014-08-13 15:34:09 -07:00
stopwords_myisam.txt Show users how fulltext search queries are parsed and executed; don't query stopwords or short tokens 2017-04-12 19:07:54 -07:00