Permit concurrent loads in gpg keychain mutex
This commit is contained in:
parent
87f03f0173
commit
3091897bf9
2 changed files with 15 additions and 2 deletions
5
changelogs/unreleased/rails5-gpg-permit-concurrent.yml
Normal file
5
changelogs/unreleased/rails5-gpg-permit-concurrent.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Permit concurrent loads in gpg keychain mutex
|
||||
merge_request: 20894
|
||||
author: Jasper Maes
|
||||
type: fixed
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue