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
F14033848: D16489.id39672.diff
Sat, Nov 9, 8:25 PM
F13983498: D16489.diff
Sun, Oct 20, 6:48 AM
F13961542: D16489.id.diff
Oct 15 2024, 5:27 AM
Unknown Object (File)
Sep 20 2024, 1:00 PM
Unknown Object (File)
Sep 18 2024, 11:10 PM
Unknown Object (File)
Sep 12 2024, 8:41 AM
Unknown Object (File)
Sep 11 2024, 10:52 PM
Unknown Object (File)
Sep 5 2024, 9:36 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.