Skip to content

Add schema_version in the commit index

Background

Sometimes we just need to reindex the whole index but with the lack of the schema_version field we can not know when the reindex migration is completed.

Proposal

Add an integer field schema_version in the commits index. Just like we have this field in the wikis index

Implementation plan

Support for schema_version in GitlabIndexer project

Add the schema_version in the commits index in the gitlab-org Project.

Following steps can go in one MR

  • Write a migration to add the integer field schema_version in the commits index mapping: #414805 (closed)
  • Update Elastic::Indexer to accept schema_version argument and send to Indexer project only if it's provided and the mapping change migration has been completed: #415107 (closed)
  • Update the GITLABELASTICINDEXERVERSION: #415107 (closed)
Edited by Ravi Kumar