rails--rails/activerecord/test
Nick Holden c773ae65af Add `active_record.destroy_association_async_batch_size` configuration
This allows applications to specify the maximum number of records that
will be destroyed in a single background job by the `dependent:
:destroy_async` association option. By default, the current behavior
will remain the same: when a parent record is destroyed, all dependent
records will be destroyed in a single background job. If the number of
dependent records is greater than this configuration, the records will
be destroyed in multiple background jobs.

At GitHub, we have a custom method for destroying associated records
in the background that we'd like to replace with
`dependent: :destroy_async`. Some associations have a large number of
dependent records, and our infrastructure requires that background jobs
complete quickly, so we limit the maximum number of dependent records
destroyed in a single background job and enqueue additional jobs when
the number of records exceeds that limit.
2022-03-09 11:13:16 -07:00
..
active_record/connection_adapters
activejob Add `active_record.destroy_association_async_batch_size` configuration 2022-03-09 11:13:16 -07:00
assets
cases Merge pull request #44637 from fatkodima/remove_foreign_key-if_exists 2022-03-09 09:22:02 -05:00
fixtures Make #to_fs the default replacement for #to_s(:format) 2022-02-07 12:41:21 +01:00
migrations Sort migration ID as int in db:migrate:status for consistency. 2021-07-16 13:10:31 -05:00
models Ensure Contract#metadata is reliably orderable 2022-02-26 03:39:02 +10:30
schema Dump the precision for datetime columns following the new defaults 2022-02-08 01:36:06 +00:00
support Rename `adapter_short` to `adapter_name` 2021-09-21 08:26:04 +09:00
config.example.yml add warning to mysql2 default prepared_statements 2021-12-21 06:36:01 +00:00
config.rb Delete AS::Dependencies.safe_constantize 2021-08-20 17:51:05 +02:00