1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib
eileencodes 6b9027bd1c
Don't execute queries in background when max_threads is 0
In the multi_thread_pool executor it's possible to have a database
configuration that wouldn't work well with a thread exectutor. This
change checks the `@db_config.max_threads` and if it is not greater than
0 we won't create a thread pool for that configuration. Database
configurations without a proper value set for `max_threads` will return
a `nil` async executor and will run queries for those connection pools
in the foreground. This allows applications to more easily control which
database configurations in their app support async queries. In this
setup one database coule be configured to run parallel queries while all
other databases run queries in the foreground.
2021-03-02 07:53:05 -05:00
..
active_record Don't execute queries in background when max_threads is 0 2021-03-02 07:53:05 -05:00
arel Allow all tree managers' initializer takes a table 2021-03-01 20:47:23 +09:00
rails/generators Set ApplicationRecord to primary_abstract_class 2021-02-05 17:02:08 -05:00
active_record.rb Allow Adapter#select_all to be performed asynchronously from a background thread pool 2021-02-08 19:17:52 +01:00
arel.rb Merge pull request #38719 from eileencodes/refactor-fetch_attribute 2020-03-13 16:26:49 -04:00