Merge branch '38171-workaround' into 'master'
Workaround for n+1 in Projects::TreeController#show Closes #38171 See merge request gitlab-org/gitlab-ce!14455
This commit is contained in:
commit
024d10b7ad
1 changed files with 4 additions and 1 deletions
|
@ -35,10 +35,13 @@ class Projects::TreeController < Projects::ApplicationController
|
|||
end
|
||||
|
||||
format.json do
|
||||
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/38261
|
||||
Gitlab::GitalyClient.allow_n_plus_1_calls do
|
||||
render json: TreeSerializer.new(project: @project, repository: @repository, ref: @ref).represent(@tree)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def create_dir
|
||||
return render_404 unless @commit_params.values.all?
|
||||
|
|
Loading…
Reference in a new issue