Skip to content

Fix N+1 for notes (comments) scope [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Dmitry Gruzd requested to merge 325937-fix-notes-n-plus-1 into master

What does this MR do?

Related to gitlab-org/search-team/team-tasks#36 (closed)

Bullet detected an N+1 call when searching Comments. Fixed by preloading associations for web searches.

Example search on GitLab.com: https://gitlab.com/search?group_id=9970&project_id=278964&repository_ref=master&scope=notes&search=update&snippets=false

#325937 (closed)

Screenshots (strongly suggested)

Screenshot_2021-03-25_at_10.37.23

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] 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

Related to #325937 (closed)

Edited by Dmitry Gruzd

Merge request reports