Commit 135ef031 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'banzai-n-plus-one' into 'master'

Gitaly N+1 notice on Banzai filtering

See merge request gitlab-org/gitlab-ce!17540
parents 35f6efae 2a5794a3
...@@ -18,7 +18,8 @@ module Banzai ...@@ -18,7 +18,8 @@ module Banzai
def find_object(project, id) def find_object(project, id)
if project && project.valid_repo? 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
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment