summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2018-03-05 15:48:56 -0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2018-03-05 15:48:56 -0300
commit2a5794a3297f7e3d8b07fbd8037978ae57268945 (patch)
treed7d415d6036c653ac9c4a62ec5b781e872244aee
parent49f72d06654bd7bdea259154e1092a53aab57acc (diff)
downloadgitlab-ce-2a5794a3297f7e3d8b07fbd8037978ae57268945.tar.gz
Add Gitaly N+1 notice for Banzai filtering
-rw-r--r--lib/banzai/filter/commit_reference_filter.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/banzai/filter/commit_reference_filter.rb b/lib/banzai/filter/commit_reference_filter.rb
index eedb95197aa..43bf4fc6565 100644
--- a/lib/banzai/filter/commit_reference_filter.rb
+++ b/lib/banzai/filter/commit_reference_filter.rb
@@ -18,7 +18,8 @@ module Banzai
def find_object(project, id)
if project && project.valid_repo?
- project.commit(id)
+ # n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/43894
+ Gitlab::GitalyClient.allow_n_plus_1_calls { project.commit(id) }
end
end