Skip to content
Snippets Groups Projects

Fix N+1 in projects REST endpoint and forked projects

All threads resolved!

What does this MR do?

When retrieve projects from the /projects REST endpoint and there are several forked projects, some N+1 are present. In this MR we fix the N+1 in the namespace, project_features, and users field of forked projects.

Before the MR, the namespace for forked projects behaved like this:

namespaces_ANTERIOR

With the preload of that relation, the new query is:

Namespaces_DESPUES

The project_features relation also behaved badly formerly:

project_features_ANTERIOR

With the preload:

Project_features_DESPUES

Lastly, the users also presented an N+1 when trying to render the avatar url:

users_ANTERIOR

But now with the preload:

users_DESPUES

Does this MR meet the acceptance criteria?

Conformity

Related to #21121 (closed)

Edited by Francisco Javier López

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Reviewer roulette

    Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.

    To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.

    To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.

    Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.

    Category Reviewer Maintainer
    backend Terri Chu (@terrichu) (UTC-4, 6 hours behind @fjsanpedro) Mikołaj Wawrzyniak (@mikolaj_wawrzyniak) (UTC+2, same timezone as @fjsanpedro)
    database Mehmet Emin Inac (@minac) (UTC+2, same timezone as @fjsanpedro) Tiger Watson (@tigerwnz) (UTC+13, 11 hours ahead of @fjsanpedro)

    If needed, you can retry the danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

    Edited by 🤖 GitLab Bot 🤖
  • Francisco Javier López marked the checklist item I have included a changelog entry. as completed

    marked the checklist item I have included a changelog entry. as completed

  • Francisco Javier López marked the checklist item Code review guidelines as completed

    marked the checklist item Code review guidelines as completed

  • marked the checklist item Merge request performance guidelines as completed

  • Francisco Javier López marked the checklist item Database guides as completed

    marked the checklist item Database guides as completed

  • Francisco Javier López marked the checklist item Style guides as completed

    marked the checklist item Style guides as completed

  • marked the checklist item Separation of EE specific content as completed

  • requested review from @terrichu

  • requested review from @alexives

  • Alex Ives removed review request for @alexives

    removed review request for @alexives

  • Alex Ives
  • requested review from @alexives

  • Alex Ives approved this merge request

    approved this merge request

  • added databasereviewed label and removed databasereview pending label

  • Alex Ives requested review from @tigerwnz

    requested review from @tigerwnz

  • Terri Chu approved this merge request

    approved this merge request

  • Terri Chu requested review from @dskim_gitlab and removed review request for @terrichu

    requested review from @dskim_gitlab and removed review request for @terrichu

  • Tiger Watson approved this merge request

    approved this merge request

  • added databaseapproved label and removed databasereviewed label

  • added 239 commits

    Compare with previous version

  • Setting label(s) devopscreate sectiondev based on ~"group::editor".

  • Sincheol (David) Kim removed review request for @dskim_gitlab

    removed review request for @dskim_gitlab

  • added 315 commits

    Compare with previous version

  • requested review from @dskim_gitlab

  • Sincheol (David) Kim approved this merge request

    approved this merge request

  • Sincheol (David) Kim resolved all threads

    resolved all threads

  • Sincheol (David) Kim enabled an automatic merge when the pipeline for 4ff2aa18 succeeds

    enabled an automatic merge when the pipeline for 4ff2aa18 succeeds

  • mentioned in commit c624b1e0

  • added workflowstaging label and removed workflowin dev label

  • added workflowcanary label and removed workflowstaging label

  • added workflowproduction label and removed workflowcanary label

  • Please register or sign in to reply
    Loading