diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-07-23 21:51:23 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-07-31 19:58:43 -0300 |
commit | f4cd926cf3eec069396ab995b3553f40617c19e6 (patch) | |
tree | 7e671fe45c2c80fa107a75334a2df01fcd3342f5 /app/models | |
parent | d55b52f2e31db2458407741e06dbe4a469a71bcd (diff) | |
download | gitlab-ce-f4cd926cf3eec069396ab995b3553f40617c19e6.tar.gz |
Add exclusive lease to mergeability check processosw-avoid-errors-due-to-concurrent-calls
Concurrent calls to UserMergeToRef RPC updating a single ref
can lead to an opaque fail that is being rescued at Gitaly.
So this commit adds an exclusive lease to the mergeability
check process with the key as the current MR ID.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/merge_request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 8ade91933a4..5e8a6a7d5e5 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -752,7 +752,7 @@ class MergeRequest < ApplicationRecord end def check_mergeability - MergeRequests::MergeabilityCheckService.new(self).execute + MergeRequests::MergeabilityCheckService.new(self).execute(retry_lease: false) end # rubocop: enable CodeReuse/ServiceClass |