Skip to content

Improve performance of Elasticsearch notes permissions migration

Dylan Griffith requested to merge make-notes-migration-more-efficient into master

What does this MR do?

We are currently running this migration in production to reindex all the notes in GitLab.com. There happen to be over 30M of them so it will take quite a while to run. We have found in #324745 (closed) that the migration is not performing as well as we'd hoped. Given that we want to keep each job taking less than 1 minute to run we want to reduce the batch size to make that easier.

We have found that 9000 per 3 minutes is too much and we are regularly overlapping with the previous batch and thus we end up often processing the same batch twice.

In addition it will be more efficient to push the work into the "initial indexing queue" instead of our main "incremental indexing queue" as the initial indexing queue has far less traffic (it only covers newly created projects while incremental is any record update in any project).

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

Merge request reports