Skip to content

[Rails5] Permit concurrent loads

Jan Provaznik requested to merge rails5-autoload into master

What does this MR do?

Rails 5 introduced a new (and safer) autoload mechanism which uses locking when loading missing constants. Under some circumstances it's possible that a deadlock occurs in multi-threaded environment (especially when running capybara tests)

To avoid these deadlocks, concurrent load is enabled when loading policies - we ere hitting timeout in this case: https://gitlab.com/gitlab-org/gitlab-ce/issues/48263

Note that autoloading is enabled only in development or test envs (not in production).

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #48263 (closed)

Merge request reports