diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-02-25 06:15:43 +0300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-02-27 14:10:20 +0300 |
commit | 7d3377bb83ad84b27ae486e502ad052562e3c96b (patch) | |
tree | 859f654921408da12a7415ed562fdd85c2eb5821 /app/controllers/dashboard/projects_controller.rb | |
parent | 3b05d4817bdef0bb34de2d6b6984e81c7aae3a16 (diff) |
Allow Gitaly N+1 calls for RootController#index
Allow developers to load GitLab root page locally without errors.
Since we know this issue for a while now, no point letting the exception
be triggered constantly.
Diffstat (limited to 'app/controllers/dashboard/projects_controller.rb')
-rw-r--r-- | app/controllers/dashboard/projects_controller.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/dashboard/projects_controller.rb b/app/controllers/dashboard/projects_controller.rb index b1d224d026f..b044affd4e8 100644 --- a/app/controllers/dashboard/projects_controller.rb +++ b/app/controllers/dashboard/projects_controller.rb @@ -13,7 +13,13 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController @projects = load_projects(params.merge(non_public: true)) respond_to do |format| - format.html + format.html do + # n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/37434 + # Also https://gitlab.com/gitlab-org/gitlab-ce/issues/40260 + Gitlab::GitalyClient.allow_n_plus_1_calls do + render + end + end format.atom do load_events render layout: 'xml.atom' |