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
Unknown Object (File)
Sat, Apr 13, 8:52 PM
Unknown Object (File)
Wed, Apr 3, 7:23 AM
Unknown Object (File)
Mar 23 2024, 7:05 PM
Unknown Object (File)
Mar 22 2024, 11:54 PM
Unknown Object (File)
Mar 13 2024, 6:56 PM
Unknown Object (File)
Feb 7 2024, 10:40 PM
Unknown Object (File)
Jan 28 2024, 11:00 AM
Unknown Object (File)
Jan 12 2024, 4:04 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.