1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-11 09:22:40 +01:00
phorge-phorge/src/infrastructure
epriestley 0364ccdd5f Fix an issue where PhabricatorWorkerLeaseQuery may lease different tasks than it selects
Summary:
We lock tasks by setting `leaseOwner` to a unique value, but the value is currently unique-to-the-process rather than unique-to-the-query. This means that if a process leases a task, then leases another task, both tasks will have the same `leaseOwner`. This can cause an issue where we go to select the task we just leased and get the other task instead, if we aren't careful about the select construction.

We can avoid this by being clever and making sure the select is constructed correctly, but making the `leaseOwner` unique to the query is much simpler and more foolproof. This guarantees we always select only the rows we just leased.

Also remove `PhabricatorGoodForNothingWorker` since `PhabricatorTestWorker` fills its role of allowing things to be tested, and simplify the unit tests since we don't need to be clever about avoiding this issue any more.

Test Plan: Ran unit tests.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3862
2012-11-01 11:30:49 -07:00
..
__tests__ Move files in Phabricator one level up 2012-06-01 12:32:44 -07:00
celerity Allow blog resources to be served without Celerity 2012-10-17 08:37:05 -07:00
daemon Fix an issue where PhabricatorWorkerLeaseQuery may lease different tasks than it selects 2012-11-01 11:30:49 -07:00
diff Implement PhabricatorMarkupInterface in Diffusion/Audit comments 2012-10-23 17:46:44 -07:00
edges If users are on the email to Phabricator, do not send them the Phabricator reply. 2012-10-10 10:18:23 -07:00
events Allow custom request checker prior to displaying page 2012-09-27 15:34:54 -07:00
internationalization Add a meta-application 2012-08-02 14:07:21 -07:00
javelin Introduce lightbox view for images 2012-10-22 19:06:56 -07:00
lint Add a basic notification UI element 2012-06-13 15:00:24 -07:00
markup Fix caching for synthetic inline comments 2012-10-29 09:38:37 -07:00
query Allow policy-aware queries to prefilter results 2012-10-23 12:01:11 -07:00
storage Undumb the Drydock resource allocator pipeline 2012-11-01 11:30:42 -07:00
testing Delete stale fixtures with bin/storage destroy 2012-10-31 18:36:38 -07:00
util Fix a memory leak in PhabricatorGlobalLock 2012-08-10 11:28:43 -07:00
PhabricatorAccessLog.php Move files in Phabricator one level up 2012-06-01 12:32:44 -07:00
PhabricatorEditor.php Fix some Editor issues 2012-10-22 16:25:31 -07:00
PhabricatorEnv.php Allow specifying custom syntax highlighter 2012-06-26 19:37:45 -07:00
PhabricatorRequestOverseer.php Add a post_max_size exception for drag and drop uploads 2012-10-22 10:54:23 -07:00
PhabricatorScopedEnv.php Move files in Phabricator one level up 2012-06-01 12:32:44 -07:00
PhabricatorSetup.php Add setup check to detect attempts to install on a path 2012-10-22 10:51:16 -07:00