diff options
author | Brent Wheeldon <brent.wheeldon@gmail.com> | 2017-11-02 14:53:43 -0400 |
---|---|---|
committer | Brent Wheeldon <brent.wheeldon@gmail.com> | 2017-11-09 10:46:01 -0500 |
commit | 1f9f6f6cfc57020ccb35f77872c56f069f337075 (patch) | |
tree | 0bcd80358ffba33786a77af6134ecbd436bcf03a /railties/test/generators/assets_generator_test.rb | |
parent | eae65ac2ab7e7a8155fa5a76c15f21cee09499c2 (diff) | |
download | rails-1f9f6f6cfc57020ccb35f77872c56f069f337075.tar.gz rails-1f9f6f6cfc57020ccb35f77872c56f069f337075.tar.bz2 rails-1f9f6f6cfc57020ccb35f77872c56f069f337075.zip |
Prevent deadlocks with load interlock and DB lock.
This fixes an issue where competing threads deadlock each other.
- Thread A holds the load interlock but is blocked on getting the DB lock
- Thread B holds the DB lock but is blocked on getting the load interlock (for example when there is a `Model.transaction` block that needs to autoload)
This solution allows for dependency loading in other threads while a thread is waiting to acquire the DB lock.
Fixes #31019
Diffstat (limited to 'railties/test/generators/assets_generator_test.rb')
0 files changed, 0 insertions, 0 deletions