@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make messages translatable and more sensible.

Summary:
These exception messages & comments didn't quite match reality.
Fixed and added pht() around a couple of them.

Test Plan: I didn't test this :P

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17578

authored by

Mukunda Modell and committed by
20after4
654f0f60 add10381

+36 -8
+2 -1
src/applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php
··· 303 303 $exceptions[] = $e; 304 304 } 305 305 } 306 - throw new PhutilAggregateException('All search hosts failed:', $exceptions); 306 + throw new PhutilAggregateException(pht('All Fulltext Search hosts failed:'), 307 + $exceptions); 307 308 } 308 309 309 310 public function indexExists(PhabricatorElasticSearchHost $host = null) {
+28
src/docs/user/cluster/cluster.diviner
··· 47 47 | **SSH Servers** | Minimal | Low | No Risk | Low 48 48 | **Web Servers** | Minimal | **High** | No Risk | Moderate 49 49 | **Notifications** | Minimal | Low | No Risk | Low 50 + | **Fulltext Search** | Moderate | **High** | Minimal Risk | Moderate 50 51 51 52 See below for a walkthrough of these services in greater detail. 52 53 ··· 235 236 hosts is unlikely to have much impact on scalability. 236 237 237 238 For details, see @{article:Cluster: Notifications}. 239 + 240 + 241 + Cluster: Fulltext Search 242 + ======================== 243 + 244 + At a certain scale, you may begin to bump up against the limitations of MySQL's 245 + built-in fulltext search capabilities. We have seen this with very large 246 + installations with several million objects in the database and very many 247 + simultaneous requests. At this point you may consider adding Elasticsearch 248 + hosts to your cluster to reduce the load on your MySQL hosts. 249 + 250 + Elasticsearch has the ability to spread the load across multiple hosts and can 251 + handle very large indexes by sharding. 252 + 253 + Search does not involve any risk of data lost because it's always possible to 254 + rebuild the search index from the original database objects. This process can 255 + be very time consuming, however, especially when the database grows very large. 256 + 257 + With multiple Elasticsearch hosts, you can survive the loss of a single host 258 + with minimal disruption as Phabricator will detect the problem and direct 259 + queries to one of the remaining hosts. 260 + 261 + Phabricator supports writing to multiple indexing servers. This Simplifies 262 + Elasticsearch upgrades and makes it possible to recover more quickly from 263 + problems with the search index. 264 + 265 + For details, see @{article:Cluster: Search}. 238 266 239 267 240 268 Overlaying Services
+6 -7
src/infrastructure/cluster/search/PhabricatorSearchService.php
··· 235 235 * @throws PhutilAggregateException 236 236 */ 237 237 public static function executeSearch(PhabricatorSavedQuery $query) { 238 - $services = self::getAllServices(); 239 238 $exceptions = array(); 240 - foreach ($services as $service) { 241 - $engine = $service->getEngine(); 242 - // try all hosts until one succeeds 239 + // try all services until one succeeds 240 + foreach (self::getAllServices() as $service) { 243 241 try { 242 + $engine = $service->getEngine(); 244 243 $res = $engine->executeSearch($query); 245 - // return immediately if we get results without an exception 244 + // return immediately if we get results 246 245 return $res; 247 246 } catch (Exception $ex) { 248 247 $exceptions[] = $ex; 249 248 } 250 249 } 251 - throw new PhutilAggregateException('All search engines failed:', 252 - $exceptions); 250 + $msg = pht('All of the configured Fulltext Search services failed.'); 251 + throw new PhutilAggregateException($msg, $exceptions); 253 252 } 254 253 255 254 }