-
- Downloads
There was an error fetching the commit references. Please try again later.
Add exclusive lease to mergeability check process
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.
Showing
- app/models/merge_request.rb 1 addition, 1 deletionapp/models/merge_request.rb
- app/services/merge_requests/mergeability_check_service.rb 42 additions, 3 deletionsapp/services/merge_requests/mergeability_check_service.rb
- changelogs/unreleased/osw-avoid-errors-due-to-concurrent-calls.yml 5 additions, 0 deletions...s/unreleased/osw-avoid-errors-due-to-concurrent-calls.yml
- lib/gitlab/exclusive_lease_helpers.rb 3 additions, 2 deletionslib/gitlab/exclusive_lease_helpers.rb
- spec/lib/gitlab/exclusive_lease_helpers_spec.rb 13 additions, 4 deletionsspec/lib/gitlab/exclusive_lease_helpers_spec.rb
- spec/requests/api/merge_requests_spec.rb 1 addition, 1 deletionspec/requests/api/merge_requests_spec.rb
- spec/services/merge_requests/mergeability_check_service_spec.rb 63 additions, 16 deletions...ervices/merge_requests/mergeability_check_service_spec.rb
Please register or sign in to comment