aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
Commit message (Collapse)AuthorAgeFilesLines
* Synchronize around deleting from the reserved connections hash.Aaron Patterson2012-10-151-1/+1
| | | | Fixes #7955
* ConnectionPool accepts spec key 'checkout_timeout'Jonathan Rochkind2012-09-241-3/+9
| | | | | | | Backport of #6441 cb6f83935 . Old 'wait_timeout' is still supported, but conflicts with mysql2 using that spec key for different thing. 'checkout_timeout' can now be used taking precedence for ConnectionPool over 'wait_timeout'.
* Revert "backport fair connection pool 02b2335563 to 3-2-stable"Rafael Mendonça França2012-09-201-190/+49
| | | | | | | | | | | | | This reverts commit 0693e079708a52b777f2b7872b8e3d467b880a0d. Revert "Cache columns metadata to avoid extra while testing" This reverts commit a82f1e3f5d11c8dfba9f4c911745ec40a7965216. Reason: This is causing failures in the postgresql build. See http://travis-ci.org/#!/rails/rails/builds/2485584 Related with #7675
* backport fair connection pool 02b2335563 to 3-2-stableJonathan Rochkind2012-09-171-49/+190
|
* Synchronize the ConnectionPool#release method to avoid thread safety issues ↵Andrew Selder2012-05-231-10/+12
| | | | | | | | | | | | | | | | | | | | [#6464] Fixes #6464 Synchronize the contents of the release method in ConnectionPool due to errors when running in high concurrency environments. Detected invalid hash contents due to unsynchronized modifications with concurrent users org/jruby/RubyHash.java:1356:in `keys' /usr/local/rvm/gems/jruby-1.6.7@new_import/gems/activerecord-3.2.3/lib/a ctive_record/connection_adapters/abstract/connection_pool.rb:294:in `release' /usr/local/rvm/gems/jruby-1.6.7@new_import/gems/activerecord-3.2.3/lib/a ctive_record/connection_adapters/abstract/connection_pool.rb:282:in `checkin'
* Merge pull request #6398 from pmahoney/threadsafe-connection-poolAaron Patterson2012-05-191-4/+8
| | | | Synchronize read and modification of @reserved_connections
* ConnectionPool.checkout takes account of ruby using 'non-blocking condition ↵Jonathan Rochkind2012-03-131-9/+18
| | | | variables' in mutex ConditionVariables
* make sure connections returned after close are marked as in_useAaron Patterson2012-03-121-0/+16
|
* inline docs for clear_active_connections! no longer says it cleans dead ↵Jonathan Rochkind2012-03-121-3/+1
| | | | threads, it doesn't since 3.2.0
* make active_connection? return true only if there is an open connection in ↵Aaron Patterson2012-03-081-3/+4
| | | | use for the current thread. fixes #5330
* push synchronization in to each method. Reduces method calls and makesAaron Patterson2011-11-291-25/+29
| | | | it clear which methods are synchronized.
* Automatic closure of connections in threads is deprecated. For exampleAaron Patterson2011-11-291-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 theAaron Patterson2011-11-291-0/+1
| | | | pool.
* Start implementing @reserved_connections in terms of connection leases.Aaron Patterson2011-11-291-3/+3
|
* Rename `checked_out` to more descriptive `active_connections`Aaron Patterson2011-11-291-3/+3
|
* Use connection lease to determine "checked_out" connectionsAaron Patterson2011-11-291-17/+21
|
* remove unused instance variableAaron Patterson2011-11-281-1/+0
|
* just check in all connectionsAaron Patterson2011-11-281-6/+2
|
* pools are 1:1 with spec now rather than 1:1 with classAaron Patterson2011-11-281-3/+6
|
* oops! I suck! :bomb:Aaron Patterson2011-11-201-1/+0
|
* pushing caching and visitors down to the connectionAaron Patterson2011-11-191-77/+31
|
* Fix pull request #3609Noé Froidevaux2011-11-131-1/+1
|
* Prevent multiple SHOW TABLES calls when a table don't exists in database.Noé Froidevaux2011-11-111-3/+3
|
* use thread locals and an instance variable within QueryCache#BodyProxy to ↵Mark J. Titorenko2011-10-071-1/+1
| | | | maintain appropriate linkage with AR database connection across threads
* Merge pull request #2897 from rsutphin/ar31-remove_connectionAaron Patterson2011-09-061-1/+1
| | | | Patch for issue #2820
* Make it the responsibility of the connection to hold onto an ARel visitor ↵Jon Leighton2011-08-081-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 instantiationAaron Patterson2011-06-271-0/+9
|
* Fix inconsistencies by being polite to the wrapped body. Needed for ↵Steve Hodgkiss2011-06-181-0/+8
| | | | Rack::Sendfile to function properly. See issue #1761.
* Allow the connection pool's #table_exists? method to give the connections ↵Ken Collins2011-06-101-0/+1
| | | | #table_exists? method a chance.
* Merge branch 'master' of git://github.com/lifo/docrailsXavier Noria2011-05-251-1/+1
|\ | | | | | | | | | | Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/core_ext/kernel/requires.rb
| * Remove extra white spaces on ActiveRecord docs.Sebastian Martinez2011-05-231-1/+1
| |
* | Remove extra white-space on some exception messages.Sebastian Martinez2011-05-231-1/+1
|/
* Fixed punctuation errors.Sebastian Martinez2011-04-221-4/+4
|
* make sure that active connections are not cleared during test when an ↵Aaron Patterson2011-03-291-2/+4
| | | | exception happens
* clearing active connections in the ConnectionManagement middleware if an ↵Aaron Patterson2011-03-291-0/+3
| | | | exception happens
* proxy body responses so we close database connections after body is flushedAaron Patterson2011-03-291-7/+24
|
* adding active_connections? to the connection pool for finding open connectionsAaron Patterson2011-03-281-0/+6
|
* adding active_connection? to the connection poolAaron Patterson2011-03-281-0/+6
|
* primary keys should not be cleared on cache clear, fixing oracle testsAaron Patterson2011-02-081-2/+0
|
* the connection pool caches table_exists? callsAaron Patterson2011-02-071-8/+14
|
* adjust query counts to be consistent across databases, make sure database ↵Aaron Patterson2011-02-041-5/+9
| | | | log the same things
* column cache now lives on the connection poolAaron Patterson2011-02-041-1/+5
|
* almost fistedAaron Patterson2011-02-041-0/+7
|
* making sure primary key is set on the columnsAaron Patterson2011-02-041-1/+9
|
* connection pool can cache column, table, and primary key informationAaron Patterson2011-02-041-0/+34
|
* Use run_callbacks; the generated _run_<name>_callbacks method is not a ↵John Firebaugh2011-01-311-1/+1
| | | | | | public interface. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Don't depend on rubygems loading thread (for Mutex)raggi2010-11-251-0/+1
|
* removing false commentAaron Patterson2010-10-071-2/+0
|
* fix ruby 1.9 deadlock problem, fixes #5736 add connection pool testsHemant Kumar2010-10-061-8/+6
|
* removing useless ternaryAaron Patterson2010-08-191-1/+1
|