Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Nov 9, 2012
  1. @jonleighton

    Properly deprecate ConnectionHandler#connection_pools

    jonleighton authored
    Rather than just changing it and hoping for the best.
    
    Requested by @jeremy:
    
    ba1544d#commitcomment-2106059
Commits on Oct 26, 2012
  1. @jonleighton

    Remove ActiveRecord::Model

    jonleighton authored
    In the end I think the pain of implementing this seamlessly was not
    worth the gain provided.
    
    The intention was that it would allow plain ruby objects that might not
    live in your main application to be subclassed and have persistence
    mixed in. But I've decided that the benefit of doing that is not worth
    the amount of complexity that the implementation introduced.
Commits on Sep 20, 2012
  1. rename AR::Model::Tag to AR::Tag - fixes #7714

    Francesco Rodriguez authored
Commits on Sep 12, 2012
  1. @arunagw

    warning removed.

    arunagw authored
    1. Unused variable
    2. possibly useless use of a variable in 
    void context
Commits on Sep 11, 2012
  1. @jrochkind

    ConnectionPool, unify exceptions, ConnectionTimeoutError

    jrochkind authored
    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 02b2335 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!
Commits on Sep 5, 2012
  1. @alup

    Fix a typo

    alup authored
Commits on Aug 31, 2012
  1. @jonleighton
  2. @jonleighton

    One hash is enough

    jonleighton authored
    We don't need separate @class_to_pool and @connection_pool hashes.
  3. @jonleighton
  4. @jonleighton

    Make connection pool retrieval faster

    jonleighton authored
    * Loop rather than recurse in retrieve_connection_pool
    * Key the hash by class rather than class name. This avoids creating
      unnecessary strings.
Commits on Jun 15, 2012
  1. @jonleighton

    Simplify AR configuration code.

    jonleighton authored
    Get rid of ActiveModel::Configuration, make better use of
    ActiveSupport::Concern + class_attribute, etc.
Commits on May 25, 2012
  1. @pmahoney

    Make connection pool fair with respect to waiting threads.

    pmahoney authored
    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.
Commits on May 23, 2012
  1. @rafaelfranca

    Whitespaces :scissors:

    rafaelfranca authored
  2. @jrochkind

    ConnectionPool wait_timeout no longer used for different types of tim…

    jrochkind authored
    …eouts. #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.
Commits on May 22, 2012
  1. @rafaelfranca

    Revert "Merge pull request #6416 from pmahoney/threadsafe-connection-…

    rafaelfranca authored
    …pool"
    
    This reverts commit d2901f0, reversing
    changes made to 525839f.
    
    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.
Commits on May 21, 2012
  1. @pmahoney
Commits on May 19, 2012
  1. @pmahoney
Commits on Apr 29, 2012
  1. @mark-rushakoff
Commits on Apr 16, 2012
  1. @tenderlove
Commits on Mar 12, 2012
  1. @tenderlove
  2. @jrochkind

    deprecated clear_stale_active_connections! can call #reap instead of …

    jrochkind authored
    …no-op'ing, #reap does the same thing
Commits on Mar 8, 2012
  1. @tenderlove

    make active_connection? return true only if there is an open connecti…

    tenderlove authored
    …on in use for the current thread. fixes #5330
Commits on Feb 24, 2012
  1. @fxn

    removes verify_active_connections!

    fxn authored
    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.
Commits on Feb 16, 2012
  1. @tenderlove
  2. @tenderlove

    database connections are automatically established after forking.

    tenderlove authored
    Connection pools are 1:1 with pids.
Commits on Jan 16, 2012
  1. @lest
Commits on Dec 31, 2011
  1. @tenderlove
  2. @tenderlove
Commits on Dec 30, 2011
  1. @tenderlove
  2. @tenderlove
  3. @tenderlove
  4. @tenderlove
  5. @tenderlove
  6. @tenderlove
  7. @tenderlove
Something went wrong with that request. Please try again.