- 09 7月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 15 6月, 2013 1 次提交
-
-
由 Angelo Capilleri 提交于
-
- 14 3月, 2013 1 次提交
-
-
由 Vipul A M 提交于
-
- 22 1月, 2013 1 次提交
-
-
由 Rafael Mendonça França 提交于
[ci skip]
-
- 20 1月, 2013 1 次提交
-
-
由 David 提交于
-
- 11 9月, 2012 1 次提交
-
-
由 Jonathan Rochkind 提交于
As a result of different commits, ConnectionPool had become of two minds about exceptions, sometimes using PoolFullError and sometimes using ConnectionTimeoutError. In fact, it was using ConnectionTimeoutError internally, but then recueing and re-raising as a PoolFullError. There's no reason for this bifurcation, standardize on ConnectionTimeoutError, which is the rails2 name and still accurately describes semantics at this point. History In Rails2, ConnectionPool raises a ConnectionTimeoutError if it can't get a connection within timeout. Originally in master/rails3, @tenderlove had planned on removing wait/blocking in connectionpool entirely, at that point he changed exception to PoolFullError. But then later wait/blocking came back, but exception remained PoolFullError. Then in 02b23355 pmahoney introduced fair waiting logic, and brought back ConnectionTimeoutError, introducing the weird bifurcation. ConnectionTimeoutError accurately describes semantics as of this point, and is backwards compat with rails2, there's no reason for PoolFullError to be introduced, and no reason for two different exception types to be used internally, no reason to rescue one and re-raise as another. Unify!
-
- 12 6月, 2012 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 26 5月, 2012 1 次提交
-
-
由 Patrick Mahoney 提交于
The core of this fix is a threadsafe, fair Queue class. It is very similar to Queue in stdlib except that it supports waiting with a timeout. The issue this solves is that if several threads are contending for database connections, an unfair queue makes is possible that a thread will timeout even while other threads successfully acquire and release connections. A fair queue means the thread that has been waiting the longest will get the next available connection. This includes a few test fixes to avoid test ordering issues that cropped up during development of this patch.
-
- 24 5月, 2012 1 次提交
-
-
由 Jonathan Rochkind 提交于
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.
-
- 23 5月, 2012 1 次提交
-
-
由 Rafael Mendonça França 提交于
This reverts commit d2901f0f, reversing changes made to 525839fd. 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.
-
- 22 5月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
These variables were issuing some "not used" warnings.
-
- 21 5月, 2012 1 次提交
-
-
由 Patrick Mahoney 提交于
-
- 16 4月, 2012 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 13 3月, 2012 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 09 3月, 2012 2 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
make active_connection? return true only if there is an open connection in use for the current thread. fixes #5330
-
- 04 1月, 2012 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 31 12月, 2011 6 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
- 30 11月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
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.
-
- 20 11月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 09 8月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Make it the responsibility of the connection to hold onto an ARel visitor 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.
-
- 07 6月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 05 6月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Refactor Active Record test connection setup. Please see the 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.
-
- 29 3月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 14 2月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 09 2月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 05 2月, 2011 3 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
- 01 12月, 2010 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 07 10月, 2010 1 次提交
-
-
由 Hemant Kumar 提交于
-
- 17 7月, 2010 3 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
- 26 2月, 2009 1 次提交
-
-
由 Manfred Stienstra 提交于
- Make sure ConnectionManagement clears connections after each call, except in tests Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-