Skip to content

Remove N+1 DB queries from indexing projects in Elasticsearch

What does this MR do?

The #as_indexed_json method is used to convert individual documents to the JSON that is sent to Elasticsearch during indexing. We need to preload the data before it gets to this method. We implemented the .preload_indexing_data method in !56808 (merged) so we just need to add this to the various classes now. This MR updates it for Project only.

Screenshots (strongly suggested)

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

Edited by Dylan Griffith

Merge request reports