From 454a762562289f421b02ed7caf80b9ff399c11bf Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 15 Feb 2019 05:04:30 -0800 Subject: [PATCH] Queue search indexing tasks at a new PRIORITY_INDEX, not PRIORITY_IMPORT Summary: Depends on D20175. Ref T12425. Ref T13253. Currently, importing commits can stall search index rebuilds, since index rebuilds use an older priority from before T11677 and weren't really updated for D16585. In general, we'd like to complete all indexing tasks before continuing repository imports. A possible exception is if you rebuild an entire index with `bin/search index --rebuild-the-world`, but we could queue those at a separate lower priority if issues arise. Test Plan: Ran some search indexing through the queue. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13253, T12425 Differential Revision: https://secure.phabricator.com/D20177 --- src/applications/search/worker/PhabricatorSearchWorker.php | 2 +- src/infrastructure/daemon/workers/PhabricatorWorker.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/applications/search/worker/PhabricatorSearchWorker.php b/src/applications/search/worker/PhabricatorSearchWorker.php index f93df63981..361d9c9b6f 100644 --- a/src/applications/search/worker/PhabricatorSearchWorker.php +++ b/src/applications/search/worker/PhabricatorSearchWorker.php @@ -14,7 +14,7 @@ final class PhabricatorSearchWorker extends PhabricatorWorker { 'parameters' => $parameters, ), array( - 'priority' => parent::PRIORITY_IMPORT, + 'priority' => parent::PRIORITY_INDEX, 'objectPHID' => $phid, )); } diff --git a/src/infrastructure/daemon/workers/PhabricatorWorker.php b/src/infrastructure/daemon/workers/PhabricatorWorker.php index 1b9821b68d..f055544b7b 100644 --- a/src/infrastructure/daemon/workers/PhabricatorWorker.php +++ b/src/infrastructure/daemon/workers/PhabricatorWorker.php @@ -18,6 +18,7 @@ abstract class PhabricatorWorker extends Phobject { const PRIORITY_DEFAULT = 2000; const PRIORITY_COMMIT = 2500; const PRIORITY_BULK = 3000; + const PRIORITY_INDEX = 3500; const PRIORITY_IMPORT = 4000; /**