• Jan Provaznik's avatar
    [Rails5] Permit concurrent loads · fdfc8d04
    Jan Provaznik authored
    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).
    fdfc8d04