Skip to content

Repair blob index for projects with mismatched index_status

What does this MR do and why?

Related to #214601 (closed)

!122912 (merged) should be merged first

  1. Introduce retry logic for acquiring the lock for indexing blobs/commits
  2. Kicks off indexing for blobs and commits (and forces it) for a project if:
    • 0 blob documents found in index
    • repository exists
    • repository is not empty
    • one of the following:
      • project missing an index_status record in the database
      • project index_status commit does not match last commit for project
  3. A new factory for IndexStatus
  4. Refactor of specs to remove reliance upon Elasticsearch, speeds up testing significantly

For repositories that contain only binary data, these rules are still valid. All binary files are indexed, the documents just don't contain any content.

Screenshots or screen recordings

N/A

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Terri Chu

Merge request reports