@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 sure writes go to the right cluster

Summary:
Two little issues

1. there was an extra call to getHostForWrite,
2. The engine instance was shared between multiple service definitions so it
was overwriting the list of writable hosts from one service with hosts from another.

Test Plan:
tested in wikimedia production with multiple services defined like this:

```language=json
[
{
"hosts": [
{
"host": "search.svc.codfw.wmnet",
"protocol": "https",
"roles": {
"read": true,
"write": true
},
"version": 5
}
],
"path": "/phabricator",
"port": 9243,
"type": "elasticsearch"
},
{
"hosts": [
{
"host": "search.svc.eqiad.wmnet",
"protocol": "https",
"roles": {
"read": true,
"write": true
},
"version": 5
}
],
"path": "/phabricator",
"port": 9243,
"type": "elasticsearch"
}
]
```

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

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

authored by

Mukunda Modell and committed by
20after4
cb1d9046 67a1c404

+1 -2
-1
src/applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php
··· 528 528 $host = $this->getHostForRead(); 529 529 } 530 530 $uri = '/_stats/'; 531 - $host = $this->getHostForRead(); 532 531 533 532 $res = $this->executeRequest($host, $uri, array()); 534 533 $stats = $res['indices'][$this->index];
+1 -1
src/infrastructure/cluster/search/PhabricatorSearchService.php
··· 198 198 implode(', ', array_keys($engines)))); 199 199 } 200 200 201 - $engine = $engines[$config['type']]; 201 + $engine = clone($engines[$config['type']]); 202 202 $cluster = new self($engine); 203 203 $cluster->setConfig($config); 204 204 $engine->setService($cluster);