Skip to content

Modify query for fetching issue/merge request thread count

Related to gitlab-org/quality/triage-ops#531 (closed)

This change improves the performance of the query for fetching count of threads initiated or continued by user. During testing new policies we have noticed that GraphQL API responds with 500 error (query in database time-outs), during the investigation we have noticed that there is an N+1 in the query we were using in GitLab Triage.

In gitlab-org/gitlab!46311 (merged) we have introduced new field to GraphQL to easily fetch count of threads for given Issue/MR and made sure that new field is not causing N+1 queries when fetching multiple Issues/MRs.

Merge request reports

Loading