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:
authorAndrew Newdigate <andrew@gitlab.com>2017-09-19 13:55:37 +0300
committerRémy Coutable <remy@rymai.me>2017-09-19 13:55:37 +0300
commit64d7ec0a9e3ffd6233ccfbe9100f8a9391c648e5 (patch)
tree2cc89bc2d1087eb145918c6ae8cbf70878d40e97 /lib/api/entities.rb
parent39dd7736585d3e35d5c6f391e6a94c312da09056 (diff)
Detect n+1 issues involving Gitaly
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 30b115b1b56..71253f72533 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -244,7 +244,10 @@ module API
end
expose :merged do |repo_branch, options|
- options[:project].repository.merged_to_root_ref?(repo_branch.name)
+ # n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/37442
+ Gitlab::GitalyClient.allow_n_plus_1_calls do
+ options[:project].repository.merged_to_root_ref?(repo_branch.name)
+ end
end
expose :protected do |repo_branch, options|