Page MenuHomePhabricator

D19504.id46641.diff
No OneTemporary

D19504.id46641.diff

diff --git a/src/applications/search/worker/PhabricatorSearchWorker.php b/src/applications/search/worker/PhabricatorSearchWorker.php
--- a/src/applications/search/worker/PhabricatorSearchWorker.php
+++ b/src/applications/search/worker/PhabricatorSearchWorker.php
@@ -38,7 +38,15 @@
$key = "index.{$object_phid}";
$lock = PhabricatorGlobalLock::newLock($key);
- $lock->lock(1);
+ try {
+ $lock->lock(1);
+ } catch (PhutilLockException $ex) {
+ // If we fail to acquire the lock, just yield. It's expected that we may
+ // contend on this lock occasionally if a large object receives many
+ // updates in a short period of time, and it's appropriate to just retry
+ // rebuilding the index later.
+ throw new PhabricatorWorkerYieldException(15);
+ }
try {
// Reload the object now that we have a lock, to make sure we have the

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 20, 1:55 PM (19 h, 17 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7022982
Default Alt Text
D19504.id46641.diff (894 B)

Event Timeline