Page MenuHomePhabricator

Support "timeout" parameter in older MySQL connections
ClosedPublic

Authored by epriestley on Apr 10 2016, 11:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 8:23 AM
Unknown Object (File)
Wed, Apr 10, 8:16 PM
Unknown Object (File)
Tue, Apr 9, 12:21 AM
Unknown Object (File)
Mon, Apr 8, 8:00 AM
Unknown Object (File)
Fri, Mar 29, 12:50 PM
Unknown Object (File)
Mar 5 2024, 9:29 PM
Unknown Object (File)
Mar 5 2024, 9:22 PM
Unknown Object (File)
Mar 5 2024, 9:22 PM
Subscribers
None

Details

Summary

Ref T6710. We have two connectors: "MySQL" and "MySQLi". The latter one ("i = improved") has had straightforward support for connection timeouts for 15 months, since it just takes a parameter.

The un-improved connector needs to take a more roundabout route.

Also, improve the exception we throw when a client gets an error because they're missing a permission. This arises when you SHOW SLAVE STATUS from a client without permission to do that, for example.

The next change will update Phabricator to use this parameter properly.

Test Plan

After next change, specified a bad database and forced thee connector to use MySQL. Forced timeout to 1 second. Reloaded page, saw an error in a few seconds instead of a few minutes.

(We are still much slower than we should be about detecting this condition and marking a host as bad, but that will come in the future.)

Diff Detail

Repository
rPHU libphutil
Branch
readonly6
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 11629
Build 14545: Run Core Tests
Build 14544: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Support "timeout" parameter in older MySQL connections.
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.Apr 10 2016, 3:04 PM