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

Fix a possible database ref fatal during MySQL setup checks if a host is unreachable

Summary:
Ref T12966. See that task for a description and reproduction steps.

If you put Phabricator in a master/replica configuration and then restart it, we may fatal here if the master is unreachable. Instead, we should survive setup checks.

Test Plan: Put Phabricator in a master/replica configuration, explicitly disabled the master by misconfiguring the port, restarted Phabricator. Before: fatal; after: login screen in read-only mode.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12966

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

+7 -1
+7 -1
src/applications/config/check/PhabricatorMySQLSetupCheck.php
··· 9 9 protected function executeChecks() { 10 10 $refs = PhabricatorDatabaseRef::getActiveDatabaseRefs(); 11 11 foreach ($refs as $ref) { 12 - $this->executeRefChecks($ref); 12 + try { 13 + $this->executeRefChecks($ref); 14 + } catch (AphrontConnectionQueryException $ex) { 15 + // If we're unable to connect to a host, just skip the checks for it. 16 + // This can happen if we're restarting during a cluster incident. See 17 + // T12966 for discussion. 18 + } 13 19 } 14 20 } 15 21