Merge branch 'an-repo-gitaly' into 'zj-repo-gitaly'

Rolling back change to n+1 detection

See merge request gitlab-org/gitlab-ce!14536
This commit is contained in:
Alejandro Rodríguez 2017-09-27 20:27:54 +00:00
commit 412845f8de

View file

@ -165,13 +165,7 @@ module Gitlab
return if permitted_call_count <= MAXIMUM_GITALY_CALLS return if permitted_call_count <= MAXIMUM_GITALY_CALLS
# We've exceeded the limit, but we may still be in the presence of a non raise TooManyInvocationsError.new(call_site, actual_call_count, max_call_count, max_stacks)
# n+1 but still complex request with many distinct calls. If the maximum
# call count is 1 or less that's probably the case.
max_count = max_call_count
return if max_count <= 1
raise TooManyInvocationsError.new(call_site, actual_call_count, max_count, max_stacks)
end end
def self.allow_n_plus_1_calls def self.allow_n_plus_1_calls