diff options
author | Sean McGivern <sean@gitlab.com> | 2018-08-16 12:17:41 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-08-21 12:40:44 +0100 |
commit | 2017c5c62abde0d6f24e3afc120365ee1aaaca4b (patch) | |
tree | 88aee49fa975ddebc57911c22acad733551cb4fc /lib | |
parent | 22d8fbacaf153c0b29738e812a22764129483eee (diff) | |
download | gitlab-ce-2017c5c62abde0d6f24e3afc120365ee1aaaca4b.tar.gz |
Fix routes N+1 in Issues::ReferencedMergeRequestsService#execute
Sorting here needs the project routes to be loaded, including the namespace
routes.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/reference_parser/merge_request_parser.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/banzai/reference_parser/merge_request_parser.rb b/lib/banzai/reference_parser/merge_request_parser.rb index a370ff5b5b3..9e5d55f72bc 100644 --- a/lib/banzai/reference_parser/merge_request_parser.rb +++ b/lib/banzai/reference_parser/merge_request_parser.rb @@ -14,11 +14,12 @@ module Banzai # Eager loading these ensures we don't end up running dozens of # queries in this process. target_project: [ - { namespace: :owner }, + { namespace: [:owner, :route] }, { group: [:owners, :group_members] }, :invited_groups, :project_members, - :project_feature + :project_feature, + :route ] }), self.class.data_attribute |