Skip to content

Resolve "Add schema_version in the commit index"

What does this MR do and why?

This MR will add an integer field schema_version in the commits index mapping. This attribute can be used to determine completed? in case of full reindexing of the commits index.

Screenshots or screen recordings

Screenshot_2023-06-12_at_23.47.24

How to set up and validate locally

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

  1. Open the rails console
    bundle exec rails c
  2. Run the following commands
require_relative 'ee/elastic/migrate/20230613555555_add_schema_version_to_commits.rb' 
AddSchemaVersionToCommits.new(20230613555555).migrate
  1. Check the mapping of the commits index
curl -H 'Content-type: application/json' -XGET 'http://localhost:9200/gitlab-development-commits/_mappings' | json_pp
  1. Make sure there is a field schema_version with type as integer is present

MR acceptance checklist

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

Related to #414804 (closed)

Edited by Ravi Kumar

Merge request reports

Loading