Skip to content

Loading project/group/global milestones times out

Summary

Loading project/group/global milestones times out

Steps to reproduce

Cause

This is caused by a security fix which checks permission on issues to be included or counted in those pages. Milestonish#issues_visible_to_user has been updated to use IssuesFinder, but this isn't fast enough at the moment.

For project milestone pages this is fixed by !8146 (merged), but for group/global milestones things are more complicated. Since they are just collections of milestones we have to check multiple milestones, and can't easily force the database to filter issues by milestone_id first. The query in Milestonish#issues_visible_to_user needs to be updated to produce more efficient SQL, which might involve changes to IssuesFinder

JSON load works https://gitlab.com/gitlab-org/gitlab-ce/milestones.json

This could be related to https://gitlab.com/gitlab-org/gitlab-ce/issues/24201 (long SQL query)

//cc @stanhu