Skip to content

Avoid calling Elasticsearch results twice

Mario de la Ossa requested to merge es_avoid_double_calls into master

What does this MR do?

On Elasticsearch searches, we call ES twice - once to get the counts for all search scopes, and then once again to get the actual result for the current scope.

This MR memoizes the actual search results so we only hit Elasticsearch once

Does this MR meet the acceptance criteria?

Conformity

Performance 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
Edited by Ash McKenzie

Merge request reports