Skip to content

Eliminate some N+1 queries on project-pipeline GraphQL endpoint

What does this MR do?

When fetching stages->jobs data with status details, every job tries to run "retryable?" and it leads to a fetching project, namespace, and route.

This MR adds a "preload" for "project" on jobs.

Related to #323213 (closed)

Screenshots (strongly suggested)

Screen_Shot_2021-06-23_at_13.36.06

Metrics

This will help us to check later:

75th and 99th percentiles of duration and db count: https://log.gprd.gitlab.net/goto/b08207d25d2259903d5140b938f612e7

Last 7 days:

Screen_Shot_2021-06-23_at_14.25.38

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Furkan Ayhan

Merge request reports