Homec4science

Distinguish between unreachable cluster database hosts and missing MySQL…

Authored by epriestley <git@epriestley.com> on Sep 2 2016, 17:03.

Description

Distinguish between unreachable cluster database hosts and missing MySQL databases

Summary:
Fixes T11577. When we connect to a host and try to select a database which does not exist, we currently treat it as though the host wasn't reachable.

This isn't correct, and prevents storage from being initialized while already in cluster mode, since the "config" database won't exist yet the first time we connect.

Instead, distinguish between AphrontSchemaQueryException (thrown on connection if the requested database is not present) and other errors.

Test Plan:

  • Put Phabricator into cluster database mode (cluster.databases = ...).
  • Swapped storage.default-namespace to force initialization of a new install.
  • Ran bin/storage upgrade.
    • Before patch: Immediate fatal about unreachablility.
    • After patch: Database initialized.
  • Also ran initialization steps in tranditional single-host mode (cluster.databases empty, mysql.host configured).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11577

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

Details

Committed
epriestley <git@epriestley.com>Sep 2 2016, 17:23
Pushed
aubortJan 31 2017, 17:16
Parents
rPH081081b20e97: Fix a Repository doc spelling mistake
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHd0013d08983a: Distinguish between unreachable cluster database hosts and missing MySQL… (authored by epriestley <git@epriestley.com>).Sep 2 2016, 17:23