diff options
author | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-07-28 16:47:26 +0300 |
---|---|---|
committer | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-07-29 16:12:52 +0300 |
commit | 3091897bf94789fb8d7d79439c44c3ec005e627e (patch) | |
tree | 64b6006d4458c830c33ee00b8e8ce55e82932280 /lib/gitlab | |
parent | 87f03f01735fb4b6dbef2e4bf625cf2546523a4e (diff) |
Permit concurrent loads in gpg keychain mutex
Diffstat (limited to 'lib/gitlab')
-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 |