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
F13158792: D16489.diff
Sun, May 5, 9:42 PM
Unknown Object (File)
Mon, Apr 29, 2:52 PM
Unknown Object (File)
Wed, Apr 24, 10:49 PM
Unknown Object (File)
Sat, Apr 13, 8:52 PM
Unknown Object (File)
Apr 3 2024, 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
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
Branch
clusterinit
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 13547
Build 17441: Run Core Tests
Build 17440: arc lint + arc unit

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.