Fix Gitaly N+1 queries in related merge requests API
In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9661, we removed the `subscribed` field from API endpoints that needed to return a list of issues or merge requests when to avoid full Markdown processing. However, we introduced a performance regression in GitLab 11.10 (https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/26367) when we converted `MergeRequestBasic` to `MergeRequest` in order to expose the head pipeline in the /api/:version/projects/:id/issues/:issue_iid/related_merge_requests endpoint. To avoid this overhead, we now omit the `subscribed` field in this API endpoint. Closes https://gitlab.com/gitlab-org/gitlab/issues/32948
Showing
Please register or sign in to comment