Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | ConnectionPool wait_timeout no longer used for different types of timeouts. ↵ | Jonathan Rochkind | 2012-05-23 | 1 | -7/+16 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #6441 An AR ConnectionSpec `wait_timeout` is pre-patch used for three different things: * mysql2 uses it for MySQL's own wait_timeout (how long MySQL should allow an idle connection before closing it), and defaults to 2592000 seconds. * ConnectionPool uses it for "number of seconds to block and wait for a connection before giving up and raising a timeout error", default 5 seconds. * ConnectionPool uses it for the Reaper, for deciding if a 'dead' connection can be reaped. Default 5 seconds. Previously, if you want to change these from defaults, you need to change them all together. This is problematic _especially_ for the mysql2/ConnectionPool conflict, you will generally _not_ want them to be the same, as evidenced by their wildly different defaults. This has caused real problems for people #6441 #2894 But as long as we're changing this, forcing renaming the ConnectionPool key to be more specific, it made sense to seperate the two ConnectionPool uses too -- these two types of ConnectionPool timeouts ought to be able to be changed independently, you won't neccesarily want them to be the same, even though the defaults are (currently) the same. | |||||
* | Revert "Merge pull request #6416 from pmahoney/threadsafe-connection-pool" | Rafael Mendonça França | 2012-05-22 | 1 | -86/+34 | |
| | | | | | | | | | | | | This reverts commit d2901f0fc4270a765717ad572d559dc49a56b3a8, reversing changes made to 525839fdd8cc34d6d524f204528d5b6f36fe410c. Conflicts: activerecord/test/cases/connection_pool_test.rb Reason: This change broke the build (http://travis-ci.org/#!/rails/rails/builds/1391490) and we don't have any solution until now. I asked the author to try to fix it and open a new pull request. | |||||
* | Make connection pool fair with respect to waiting threads. | Patrick Mahoney | 2012-05-20 | 1 | -34/+86 | |
| | ||||||
* | Synchronize read and modification of @reserved_connections hash to avoid ↵ | Patrick Mahoney | 2012-05-19 | 1 | -4/+8 | |
| | | | | concurrency error. | |||||
* | Remove unused assignments | Mark Rushakoff | 2012-04-29 | 1 | -5/+3 | |
| | ||||||
* | opening a connection will block if the pool is full | Aaron Patterson | 2012-04-15 | 1 | -20/+39 | |
| | ||||||
* | make sure connections returned after close are marked as in_use | Aaron Patterson | 2012-03-12 | 1 | -4/+17 | |
| | ||||||
* | deprecated clear_stale_active_connections! can call #reap instead of ↵ | Jonathan Rochkind | 2012-03-12 | 1 | -1/+2 | |
| | | | | no-op'ing, #reap does the same thing | |||||
* | make active_connection? return true only if there is an open connection in ↵ | Aaron Patterson | 2012-03-08 | 1 | -7/+4 | |
| | | | | use for the current thread. fixes #5330 | |||||
* | removes verify_active_connections! | Xavier Noria | 2012-02-24 | 1 | -15/+0 | |
| | | | | | | | The method verify_active_connections! was used in the old days (up to 2.1 I think) by the dispatcher to verify the connections, but nowadays we do that in a different way and this method is obsolete. | |||||
* | use Process.pid rather than $$ | Aaron Patterson | 2012-02-16 | 1 | -5/+5 | |
| | ||||||
* | database connections are automatically established after forking. | Aaron Patterson | 2012-02-16 | 1 | -13/+47 | |
| | | | | Connection pools are 1:1 with pids. | |||||
* | use Rack::BodyProxy in activerecord middlewares | Sergey Nartimov | 2012-01-16 | 1 | -31/+5 | |
| | ||||||
* | updating the reaping frequency documentation | Aaron Patterson | 2011-12-30 | 1 | -0/+3 | |
| | ||||||
* | rename start to run and use Thread.pass rather than sleeping to schedule the ↵ | Aaron Patterson | 2011-12-30 | 1 | -2/+2 | |
| | | | | watchdog | |||||
* | connection pool starts the reaper | Aaron Patterson | 2011-12-30 | 1 | -0/+1 | |
| | ||||||
* | each connection pool has a reaper | Aaron Patterson | 2011-12-30 | 1 | -1/+5 | |
| | ||||||
* | introduce a timer class for reaping connections | Aaron Patterson | 2011-12-30 | 1 | -0/+19 | |
| | ||||||
* | raise a pull full error when the connection pool is full and no connection ↵ | Aaron Patterson | 2011-12-30 | 1 | -18/+20 | |
| | | | | can be obtained | |||||
* | connections are only removed if they are inactve | Aaron Patterson | 2011-12-30 | 1 | -1/+1 | |
| | ||||||
* | connections can be reaped via the `reap` method | Aaron Patterson | 2011-12-30 | 1 | -0/+12 | |
| | ||||||
* | deal with removing connections associated with the current thread | Aaron Patterson | 2011-12-30 | 1 | -0/+7 | |
| | ||||||
* | connections can be removed from the pool | Aaron Patterson | 2011-12-30 | 1 | -1/+9 | |
| | ||||||
* | queue and signal no longer needed | Aaron Patterson | 2011-12-30 | 1 | -2/+0 | |
| | ||||||
* | refactor checking out the connection | Aaron Patterson | 2011-12-30 | 1 | -5/+6 | |
| | ||||||
* | infinite loop is no longer necessary | Aaron Patterson | 2011-12-30 | 1 | -20/+11 | |
| | ||||||
* | connections must be checked in at the end of a thread | Aaron Patterson | 2011-12-30 | 1 | -17/+1 | |
| | ||||||
* | Support establishing connection on ActiveRecord::Model. | Jon Leighton | 2011-12-28 | 1 | -1/+1 | |
| | | | | | This is the 'top level' connection, inherited by any models that include ActiveRecord::Model or inherit from ActiveRecord::Base. | |||||
* | Extract common logic into a method | Jon Leighton | 2011-12-24 | 1 | -6/+1 | |
| | ||||||
* | I herd you like modules. | Jon Leighton | 2011-12-24 | 1 | -1/+6 | |
| | ||||||
* | removing deprecated methods | Aaron Patterson | 2011-12-21 | 1 | -28/+0 | |
| | ||||||
* | push synchronization in to each method. Reduces method calls and makes | Aaron Patterson | 2011-11-29 | 1 | -25/+29 | |
| | | | | it clear which methods are synchronized. | |||||
* | Automatic closure of connections in threads is deprecated. For example | Aaron Patterson | 2011-11-29 | 1 | -1/+7 | |
| | | | | | | | | | | | | | | | | | the following code is deprecated: Thread.new { Post.find(1) }.join It should be changed to close the database connection at the end of the thread: Thread.new { Post.find(1) Post.connection.close }.join Only people who spawn threads in their application code need to worry about this change. | |||||
* | AbstractAdapter#close can be called to add the connection back to the | Aaron Patterson | 2011-11-29 | 1 | -0/+1 | |
| | | | | pool. | |||||
* | Start implementing @reserved_connections in terms of connection leases. | Aaron Patterson | 2011-11-29 | 1 | -3/+3 | |
| | ||||||
* | Rename `checked_out` to more descriptive `active_connections` | Aaron Patterson | 2011-11-29 | 1 | -3/+3 | |
| | ||||||
* | Use connection lease to determine "checked_out" connections | Aaron Patterson | 2011-11-29 | 1 | -17/+21 | |
| | ||||||
* | remove unused instance variable | Aaron Patterson | 2011-11-28 | 1 | -1/+0 | |
| | ||||||
* | just check in all connections | Aaron Patterson | 2011-11-28 | 1 | -6/+2 | |
| | ||||||
* | pools are 1:1 with spec now rather than 1:1 with class | Aaron Patterson | 2011-11-28 | 1 | -3/+6 | |
| | ||||||
* | oops! I suck! :bomb: | Aaron Patterson | 2011-11-20 | 1 | -1/+0 | |
| | ||||||
* | pushing caching and visitors down to the connection | Aaron Patterson | 2011-11-19 | 1 | -77/+31 | |
| | ||||||
* | Fix pull request #3609 | Noé Froidevaux | 2011-11-13 | 1 | -1/+1 | |
| | ||||||
* | Prevent multiple SHOW TABLES calls when a table don't exists in database. | Noé Froidevaux | 2011-11-11 | 1 | -3/+3 | |
| | ||||||
* | use thread locals and an instance variable within QueryCache#BodyProxy to ↵ | Mark J. Titorenko | 2011-10-07 | 1 | -1/+1 | |
| | | | | maintain appropriate linkage with AR database connection across threads | |||||
* | Merge pull request #2897 from rsutphin/ar31-remove_connection | Aaron Patterson | 2011-09-06 | 1 | -1/+1 | |
| | | | | Patch for issue #2820 | |||||
* | Make it the responsibility of the connection to hold onto an ARel visitor ↵ | Jon Leighton | 2011-08-08 | 1 | -4/+15 | |
| | | | | for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now. | |||||
* | cache column defaults for AR object instantiation | Aaron Patterson | 2011-06-27 | 1 | -0/+9 | |
| | ||||||
* | Fix inconsistencies by being polite to the wrapped body. Needed for ↵ | Steve Hodgkiss | 2011-06-18 | 1 | -0/+8 | |
| | | | | Rack::Sendfile to function properly. See issue #1761. | |||||
* | Allow the connection pool's #table_exists? method to give the connections ↵ | Ken Collins | 2011-06-10 | 1 | -0/+1 | |
| | | | | #table_exists? method a chance. |