diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-07-30 19:00:31 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-07-30 19:00:31 +0300 |
commit | 6f240d7b0c73560ebd7cec141a042c3840c475cf (patch) | |
tree | 060518f61405b52112921fc5627724e04007be60 /lib | |
parent | ff060ad4056494d32c00a06b134b1f4e20751e19 (diff) | |
parent | 3091897bf94789fb8d7d79439c44c3ec005e627e (diff) |
Merge branch 'rails5-gpg-permit-concurrent' into 'master'
Permit concurrent loads in gpg keychain mutex
See merge request gitlab-org/gitlab-ce!20894
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/gpg.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/gitlab/gpg.rb b/lib/gitlab/gpg.rb index a4263369269..8a91e034377 100644 --- a/lib/gitlab/gpg.rb +++ b/lib/gitlab/gpg.rb @@ -71,8 +71,16 @@ module Gitlab if MUTEX.locked? && MUTEX.owned? optimistic_using_tmp_keychain(&block) else - MUTEX.synchronize do - optimistic_using_tmp_keychain(&block) + if Gitlab.rails5? + ActiveSupport::Dependencies.interlock.permit_concurrent_loads do + MUTEX.synchronize do + optimistic_using_tmp_keychain(&block) + end + end + else + MUTEX.synchronize do + optimistic_using_tmp_keychain(&block) + end end end end |