Page MenuHomePhabricator

D17578.id42288.diff
No OneTemporary

D17578.id42288.diff

diff --git a/src/applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php b/src/applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php
--- a/src/applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php
+++ b/src/applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php
@@ -303,7 +303,8 @@
$exceptions[] = $e;
}
}
- throw new PhutilAggregateException('All search hosts failed:', $exceptions);
+ throw new PhutilAggregateException(pht('All Fulltext Search hosts failed:'),
+ $exceptions);
}
public function indexExists(PhabricatorElasticSearchHost $host = null) {
diff --git a/src/infrastructure/cluster/search/PhabricatorSearchService.php b/src/infrastructure/cluster/search/PhabricatorSearchService.php
--- a/src/infrastructure/cluster/search/PhabricatorSearchService.php
+++ b/src/infrastructure/cluster/search/PhabricatorSearchService.php
@@ -235,21 +235,20 @@
* @throws PhutilAggregateException
*/
public static function executeSearch(PhabricatorSavedQuery $query) {
- $services = self::getAllServices();
$exceptions = array();
- foreach ($services as $service) {
- $engine = $service->getEngine();
- // try all hosts until one succeeds
+ // try all services until one succeeds
+ foreach (self::getAllServices() as $service) {
try {
+ $engine = $service->getEngine();
$res = $engine->executeSearch($query);
- // return immediately if we get results without an exception
+ // return immediately if we get results
return $res;
} catch (Exception $ex) {
$exceptions[] = $ex;
}
}
- throw new PhutilAggregateException('All search engines failed:',
- $exceptions);
+ $msg = pht('All of the configured Fulltext Search services failed.');
+ throw new PhutilAggregateException($msg, $exceptions);
}
}

File Metadata

Mime Type
text/plain
Expires
Sun, Jul 20, 5:59 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8339422
Default Alt Text
D17578.id42288.diff (1 KB)

Event Timeline