Page MenuHomePhabricator

Distinguish between unreachable cluster database hosts and missing MySQL databases
ClosedPublic

Authored by epriestley on Sep 2 2016, 3:08 PM.
Tags
None
Referenced Files
F19040056: D16489.id.diff
Wed, Nov 26, 10:40 AM
F19032370: D16489.diff
Tue, Nov 25, 6:21 AM
F19027789: D16489.id39674.diff
Mon, Nov 24, 2:29 PM
F19027788: D16489.id.diff
Mon, Nov 24, 2:29 PM
F18978685: D16489.id39672.diff
Sun, Nov 16, 8:40 PM
F18854061: D16489.diff
Oct 31 2025, 9:31 PM
F18834931: D16489.id39672.diff
Oct 26 2025, 12:01 PM
F18828312: D16489.diff
Oct 24 2025, 3:44 PM
Subscribers
None

Details

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

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Distinguish between unreachable cluster database hosts and missing MySQL databases.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Sep 2 2016, 3:11 PM
epriestley edited edge metadata.
This revision was automatically updated to reflect the committed changes.