Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ConnectionPool accepts spec key 'checkout_timeout' (Backport) #7684
Previously, ConnectionPool uses connection spec key 'wait_timeout' (default 5 seconds) to decide how long a thread can block waiting for a connection to be avail before raising.
However, mysql2 adapter uses this same 'wait_timeout' key for an entirely different value -- setting the MySQL server's own 'wait timeout', how long the server will allow a connection to be idle before closing it. Default is several hours.
Extreme differences in default shows you often do not want these two values to be the same. But if you don't want them to be default, there is no supported API to change one without changing the other to be the same, since they both use 'wait_timeout'.
So this change maeks ConnectionPool use
The actual code change is very straightforward. But I wasn't sure how to write the test. The test is a bit wonky, if someone has a suggestion of how to organize the test better, please do share. @rafaelfranca , any interest/feedback?
I can add a CHANGELOG entry to the pull request commit (I wasn't sure if
On Mon, Sep 24, 2012 at 1:27 PM, Rafael Mendonça França <