Resolve "Banzai::Filter::MergeRequestReferenceFilter has three N+1 query problems"
What does this MR do?
This merge request fixes 3 different N+1 query problems in Banzai::Filter::MergeRequestReferenceFilter
.
Basically, I re-used the approach from Banzai::Filter::IssueReferenceFilter
, and I had to add .includes(target_project: :namespace)
for the 3rd N+1 query problem (this wasn't needed for issue, probably because the associated project's namespaces are automatically preloaded, but for merge requests, the association is named target_project
instead of project
so...).
Before | After |
---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Does this MR meet the acceptance criteria?
-
No Changelog entry needed. - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
Closes #30098 (closed) /cc @stanhu
Merge request reports
Activity
added 38 commits
-
7718475b...40e3a701 - 33 commits from branch
master
- baeefecb - If wget fails, remove the empty file created
- 42f47473 - Add N+1 query problem specs for Issue and MergeRequest ReferenceFilter classes
- 79ae1084 - Get rid of a first N+1 query problem
- 73c37e84 - Get rid of second N+1 query problem
- 6dc43c8e - Get rid of a third N+1 query problem
Toggle commit list-
7718475b...40e3a701 - 33 commits from branch
- Resolved by Rémy Coutable
- Resolved by Rémy Coutable
added 44 commits
-
6dc43c8e...19a44034 - 40 commits from branch
master
- 20bada33 - Add N+1 query problem specs for Issue and MergeRequest ReferenceFilter classes
- 8e388fca - Get rid of a first N+1 query problem
- 38efe1bf - Get rid of second N+1 query problem
- 8efbf534 - Get rid of a third N+1 query problem
Toggle commit list-
6dc43c8e...19a44034 - 40 commits from branch
@yorickpeterse Thanks! It's all good now!
changed milestone to %9.0
@rymai It seems you forgot to add a changelog entry, could you add one?
@yorickpeterse Right, I thought this was not a user-facing change, but it actually is, indeed (https://docs.gitlab.com/ce/development/changelog.html#what-warrants-a-changelog-entry).
Changelog added in cf394a03, I've set it as
[ci skip]
since the latest pipeline passed, is it ok for you?mentioned in commit 1bec2fb3
mentioned in issue #30318 (closed)
mentioned in commit f064a842