Skip to content

Synchronize the body of the ConnectionPool#release method to improve thread safety. #6467

Merged
merged 1 commit into from May 23, 2012

2 participants

@aselder
aselder commented May 23, 2012

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/active_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/active_record/connection_adapters/abstract/connection_pool.rb:282:in `checkin'
Andrew Selder Synchronize the ConnectionPool#release method to avoid thread safety …
…issues [#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'
e663aa3
@tenderlove tenderlove merged commit 356f2a6 into rails:3-2-stable May 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.