Home GnuPG

Distinguish between unreachable cluster database hosts and missing MySQL…
d0013d08983aUnpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

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

Provenance
epriestley <git@epriestley.com>Authored on Sep 2 2016, 5:03 PM
Parents
rPHAB081081b20e97: Fix a Repository doc spelling mistake
Branches
Unknown
Tags
Unknown

Event Timeline