Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14738378
D19504.id46641.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
894 B
Referenced Files
None
Subscribers
None
D19504.id46641.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D19504: When search indexers contend for a lock, just yield
Attached
Detach File
Event Timeline
Log In to Comment