Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | ConnectionPool wait_timeout no longer used for different types of timeouts. ↵ | Jonathan Rochkind | 2012-05-23 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #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 | -115/+0 |
| | | | | | | | | | | | | 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. | ||||
* | Remove not used variables from connection poll test | Carlos Antonio da Silva | 2012-05-21 | 1 | -2/+2 |
| | | | | These variables were issuing some "not used" warnings. | ||||
* | Make connection pool fair with respect to waiting threads. | Patrick Mahoney | 2012-05-20 | 1 | -0/+115 |
| | |||||
* | opening a connection will block if the pool is full | Aaron Patterson | 2012-04-15 | 1 | -0/+24 |
| | |||||
* | make sure connections returned after close are marked as in_use | Aaron Patterson | 2012-03-12 | 1 | -0/+10 |
| | |||||
* | ensure that released connections move between threads | Aaron Patterson | 2012-03-08 | 1 | -0/+18 |
| | |||||
* | make active_connection? return true only if there is an open connection in ↵ | Aaron Patterson | 2012-03-08 | 1 | -0/+35 |
| | | | | use for the current thread. fixes #5330 | ||||
* | actually disconnect from the database at the end of each test | Aaron Patterson | 2012-01-03 | 1 | -2/+2 |
| | |||||
* | raise a pull full error when the connection pool is full and no connection ↵ | Aaron Patterson | 2011-12-30 | 1 | -0/+8 |
| | | | | can be obtained | ||||
* | connections are only removed if they are inactve | Aaron Patterson | 2011-12-30 | 1 | -2/+18 |
| | |||||
* | connections can be reaped via the `reap` method | Aaron Patterson | 2011-12-30 | 1 | -0/+15 |
| | |||||
* | deal with removing connections associated with the current thread | Aaron Patterson | 2011-12-30 | 1 | -0/+8 |
| | |||||
* | connections can be removed from the pool | Aaron Patterson | 2011-12-30 | 1 | -0/+19 |
| | |||||
* | connections must be checked in at the end of a thread | Aaron Patterson | 2011-12-30 | 1 | -14/+3 |
| | |||||
* | Automatic closure of connections in threads is deprecated. For example | Aaron Patterson | 2011-11-29 | 1 | -26/+5 |
| | | | | | | | | | | | | | | | | | 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. | ||||
* | pushing caching and visitors down to the connection | Aaron Patterson | 2011-11-19 | 1 | -37/+0 |
| | |||||
* | Make it the responsibility of the connection to hold onto an ARel visitor ↵ | Jon Leighton | 2011-08-08 | 1 | -0/+4 |
| | | | | 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. | ||||
* | please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT | Aaron Patterson | 2011-06-06 | 1 | -1/+1 |
| | |||||
* | Refactor Active Record test connection setup. Please see the ↵ | Jon Leighton | 2011-06-04 | 1 | -1/+1 |
| | | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases. | ||||
* | adding active_connection? to the connection pool | Aaron Patterson | 2011-03-28 | 1 | -0/+8 |
| | |||||
* | Fix test/cases/connection_pool_test.rb for sqlite3 in-memory db | Jon Leighton | 2011-02-14 | 1 | -0/+10 |
| | |||||
* | primary keys should not be cleared on cache clear, fixing oracle tests | Aaron Patterson | 2011-02-08 | 1 | -3/+1 |
| | |||||
* | column cache now lives on the connection pool | Aaron Patterson | 2011-02-04 | 1 | -0/+20 |
| | |||||
* | making sure primary key is set on the columns | Aaron Patterson | 2011-02-04 | 1 | -0/+9 |
| | |||||
* | connection pool can cache column, table, and primary key information | Aaron Patterson | 2011-02-04 | 1 | -0/+35 |
| | |||||
* | fix whitespace errors | Aaron Patterson | 2010-11-30 | 1 | -2/+2 |
| | |||||
* | fix ruby 1.9 deadlock problem, fixes #5736 add connection pool tests | Hemant Kumar | 2010-10-06 | 1 | -0/+29 |
| | |||||
* | adding a test for clearing stale connections | Aaron Patterson | 2010-07-16 | 1 | -0/+31 |
| | |||||
* | fixing test file name | Aaron Patterson | 2010-07-16 | 1 | -25/+0 |
| | |||||
* | fixing whitespace errors | Aaron Patterson | 2010-07-16 | 1 | -4/+4 |
| | |||||
* | Add test case for ActiveRecord::ConnectionAdapters::ConnectionManagement. | Manfred Stienstra | 2009-02-25 | 1 | -0/+25 |
- Make sure ConnectionManagement clears connections after each call, except in tests Signed-off-by: Joshua Peek <josh@joshpeek.com> |