Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/gitaly_client/operation_service.rb')
-rw-r--r--lib/gitlab/gitaly_client/operation_service.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/gitlab/gitaly_client/operation_service.rb b/lib/gitlab/gitaly_client/operation_service.rb
index c17934f12c3..adbf07de1b9 100644
--- a/lib/gitlab/gitaly_client/operation_service.rb
+++ b/lib/gitlab/gitaly_client/operation_service.rb
@@ -168,8 +168,12 @@ module Gitlab
raise unless decoded_error.present?
- raise decoded_error
+ # We simply ignore any reference update errors which are typically an
+ # indicator of multiple RPC calls trying to update the same reference
+ # at the same point in time.
+ return if decoded_error.is_a?(Gitlab::Git::ReferenceUpdateError)
+ raise decoded_error
ensure
request_enum.close
end
@@ -495,6 +499,12 @@ module Gitlab
access_check_error = detailed_error.access_check
# These messages were returned from internal/allowed API calls
Gitlab::Git::PreReceiveError.new(fallback_message: access_check_error.error_message)
+ when :reference_update
+ reference_update_error = detailed_error.reference_update
+ Gitlab::Git::ReferenceUpdateError.new(err.details,
+ reference_update_error.reference_name,
+ reference_update_error.old_oid,
+ reference_update_error.new_oid)
else
# We're handling access_check only for now, but we'll add more detailed error types
nil