Commit 28d57445 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'post_receive_n_plus_1_workaround' into 'master'

Workaround for #38259

See merge request gitlab-org/gitlab-ce!14453
parents e85e803c 9f71ea0d
...@@ -64,8 +64,11 @@ module Gitlab ...@@ -64,8 +64,11 @@ module Gitlab
# For performance purposes maximum 20 latest commits # For performance purposes maximum 20 latest commits
# will be passed as post receive hook data. # will be passed as post receive hook data.
commit_attrs = commits_limited.map do |commit| # n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/38259
commit.hook_attrs(with_changed_files: true) commit_attrs = Gitlab::GitalyClient.allow_n_plus_1_calls do
commits_limited.map do |commit|
commit.hook_attrs(with_changed_files: true)
end
end end
type = Gitlab::Git.tag_ref?(ref) ? 'tag_push' : 'push' type = Gitlab::Git.tag_ref?(ref) ? 'tag_push' : 'push'
......
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