Skip to content

Fix blobs search N+1 [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Dmitry Gruzd requested to merge 326318-fix-blobs-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 blobs (Code Search). Fixed by preloading associations for web searches. In this case we're actually preloading project associations.

The yield_each_search_result is responsible for preloading projects and we pass with_web_entity_associations there.

#326318 (closed)

Screenshots (strongly suggested)

Screenshot_2021-03-30_at_15.09.27

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 #326318 (closed)

Edited by Dmitry Gruzd

Merge request reports