Skip to content
Snippets Groups Projects
Commit 55823c40 authored by James Lopez's avatar James Lopez
Browse files

Merge branch 'zj-lower-too-many-invocations-gitaly-bar' into 'master'

Lower the allowed Gitaly call count to 30

See merge request gitlab-org/gitlab-ce!25467
parents b569e76c c00a1ec0
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -40,9 +40,12 @@ module Network
# Get commits from repository
#
def collect_commits
find_commits(count_to_display_commit_in_center).map do |commit|
# Decorate with app/model/network/commit.rb
Network::Commit.new(commit)
# https://gitlab.com/gitlab-org/gitlab-ce/issues/58013
Gitlab::GitalyClient.allow_n_plus_1_calls do
find_commits(count_to_display_commit_in_center).map do |commit|
# Decorate with app/model/network/commit.rb
Network::Commit.new(commit)
end
end
end
 
Loading
Loading
Loading
Loading
@@ -150,7 +150,10 @@ module Banzai
end
 
def uri_type(path)
@uri_types[path] ||= current_commit.uri_type(path)
# https://gitlab.com/gitlab-org/gitlab-ce/issues/58011
Gitlab::GitalyClient.allow_n_plus_1_calls do
@uri_types[path] ||= current_commit.uri_type(path)
end
end
 
def current_commit
Loading
Loading
Loading
Loading
@@ -28,7 +28,7 @@ module Gitlab
 
PEM_REGEX = /\-+BEGIN CERTIFICATE\-+.+?\-+END CERTIFICATE\-+/m
SERVER_VERSION_FILE = 'GITALY_SERVER_VERSION'
MAXIMUM_GITALY_CALLS = 35
MAXIMUM_GITALY_CALLS = 30
CLIENT_NAME = (Sidekiq.server? ? 'gitlab-sidekiq' : 'gitlab-web').freeze
 
MUTEX = Mutex.new
Loading
Loading
Loading
Loading
@@ -280,7 +280,10 @@ module Gitlab
# add_namespace("default", "gitlab")
#
def add_namespace(storage, name)
Gitlab::GitalyClient::NamespaceService.new(storage).add(name)
# https://gitlab.com/gitlab-org/gitlab-ce/issues/58012
Gitlab::GitalyClient.allow_n_plus_1_calls do
Gitlab::GitalyClient::NamespaceService.new(storage).add(name)
end
rescue GRPC::InvalidArgument => e
raise ArgumentError, e.message
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment