mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 19:13:39 +08:00
d3625f2288
Why this change? When running system tests with all official plugins installed, we have encountered instances where the system tests will hang. When dumping the backtraces of the threads, we can see that the main thread running the tests is stuck in a deadlock with the puma thread while serving a request. The deadlock happens when the main thread acquires the `ActiveSupport::Concurrency::LoadInterlockAwareMonitor` lock first in `ActiveRecord::ConnectionAdapters::AbstractAdapter` before acquring another `Monitor` lock in `ActiveRecord::ModelSchema`. In the Puma thread, it acquires the `Monitor` lock in `ActiveRecord::ModelSchema` first before acquring the `ActiveSupport::Concurrency::LoadInterlockAwareMonitor` lock. What does this change do? To workaround this problem, we will preload all model schema cache before running system tests such that the `Monitor` lock in `ActiveRecord::ModelSchema` will not be acquired. |
||
---|---|---|
.. | ||
fabricators | ||
fixtures | ||
generator | ||
helpers | ||
import_export | ||
initializers | ||
integration | ||
integrity | ||
jobs | ||
lib | ||
mailers | ||
migrations | ||
models | ||
multisite | ||
requests | ||
script/import_scripts | ||
serializers | ||
services | ||
support | ||
system | ||
tasks | ||
views | ||
rails_helper.rb | ||
regenerate_swagger_docs | ||
swagger_helper.rb |