1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/CHANGELOG.md
jeffdoering e2d11970f2 Make ActiveRecord ConnectionPool.connections thread-safe. (#36473)
* Make ActiveRecord `ConnectionPool.connections` thread-safe.

ConnectionPool documentation is clear on the need to synchronize
access to @connections but also states that public methods do not
require synchronization. Existing code exposed @connections
directly via attr_reader. The fix uses synchronize() to lock
@connections then returns a copy to the caller using Array.dup().

Includes comments on the connections method that thread-safe access
to the connections array does not imply thread-safety of accessing
methods on the actual connections.

Adds a test-case that modifies the pool using a supported method
in one thread  while a second thread accesses pool.connections.
The test fails without this patch.

Fixes #36465.

* Update activerecord/test/cases/connection_pool_test.rb

[jeffdoering + Rafael Mendonça França]
2019-06-13 14:23:13 -04:00

747 B

  • Make ActiveRecord ConnectionPool.connections method thread-safe.

    Fixes #36465.

    Jeff Doering

  • Add support for multiple databases to rails db:abort_if_pending_migrations.

    Mark Lee

  • Fix sqlite3 collation parsing when using decimal columns.

    Martin R. Schuster

  • Fix invalid schema when primary key column has a comment.

    Fixes #29966.

    Guilherme Goettems Schneider

  • Fix table comment also being applied to the primary key column.

    Guilherme Goettems Schneider

  • Allow generated create_table migrations to include or skip timestamps.

    Michael Duchemin

Please check 6-0-stable for previous changes.