@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.

Correct `bin/storage analyze` internal API for cluster environments

Summary:
Ref T12819. This worked right in a non-cluster environment, but `bin/storage upgrade` iterates over each master in a partitioned cluster environment.

Tweak the API so `bin/storage analyze` targets a single host but `bin/storage upgrade` can hit all the masters.

Test Plan: Will run `bin/storage upgrade` in production again. Ran `upgrade` and `analyze` locally, still work fine.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12819

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

+6 -4
+2 -1
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementAnalyzeWorkflow.php
··· 12 12 } 13 13 14 14 public function didExecute(PhutilArgumentParser $args) { 15 - $this->analyzeTables(); 15 + $api = $this->getSingleAPI(); 16 + $this->analyzeTables($api); 16 17 return 0; 17 18 } 18 19
+4 -3
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
··· 143 143 if (!$this->dryRun) { 144 144 $should_analyze = (($err == 0) || ($err == 2)); 145 145 if ($should_analyze) { 146 - $this->analyzeTables(); 146 + $this->analyzeTables($api); 147 147 } 148 148 } 149 149 } catch (Exception $ex) { ··· 1172 1172 ->lock(); 1173 1173 } 1174 1174 1175 - final protected function analyzeTables() { 1175 + final protected function analyzeTables( 1176 + PhabricatorStorageManagementAPI $api) { 1177 + 1176 1178 // Analyzing tables can sometimes have a significant effect on query 1177 1179 // performance, particularly for the fulltext ngrams tables. See T12819 1178 1180 // for some specific examples. 1179 1181 1180 - $api = $this->getSingleAPI(); 1181 1182 $conn = $api->getConn(null); 1182 1183 1183 1184 $patches = $this->getPatches();