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 @@ -528,7 +528,6 @@ $host = $this->getHostForRead(); } $uri = '/_stats/'; - $host = $this->getHostForRead(); $res = $this->executeRequest($host, $uri, array()); $stats = $res['indices'][$this->index]; 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 @@ -198,7 +198,7 @@ implode(', ', array_keys($engines)))); } - $engine = $engines[$config['type']]; + $engine = clone($engines[$config['type']]); $cluster = new self($engine); $cluster->setConfig($config); $engine->setService($cluster);