From ba7c501fef5976ea7a1cc4212e84742246fed781 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sat, 17 Aug 2019 15:39:39 -0700 Subject: Fix Gitaly N+1 calls with listing issues/MRs via API In GitLab 9.0, https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9661 removed the `subscribed` flag from the API when the user requested a list of issues or merge requests since calculating this value triggers extensive Markdown processing. In GitLab 12.0 via a4fbf39e, we accidentally reintroduced this performance regression by changing `IssueBasic` to `Issue` in `entities.rb`. This showed up as a Gitaly N+1 issue since the Markdown processing would attempt to extract a commit if it detected a regex that matched a commit. We restore the prior behavior by once again removing the `subscribed` flag for the bulk list of issues and merge requests and add a test to ensure they aren't reintroduced. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66202 --- doc/api/issues.md | 2 -- 1 file changed, 2 deletions(-) (limited to 'doc/api') diff --git a/doc/api/issues.md b/doc/api/issues.md index 96a547551f1..11c18ef94ba 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -136,7 +136,6 @@ Example response: "award_emoji":"http://example.com/api/v4/projects/1/issues/76/award_emoji", "project":"http://example.com/api/v4/projects/1" }, - "subscribed": false, "task_completion_status":{ "count":0, "completed_count":0 @@ -441,7 +440,6 @@ Example response: "award_emoji":"http://example.com/api/v4/projects/4/issues/41/award_emoji", "project":"http://example.com/api/v4/projects/4" }, - "subscribed": false, "task_completion_status":{ "count":0, "completed_count":0 -- cgit v1.2.3