Skip to content

Fix settings for newly created incides

Dmitry Gruzd requested to merge 420347-fix-new-index-settings into master

What does this MR do and why?

It turns out that we were merging all index settings, which caused this bug: gitlab-production index gets created with a sha... (#420347 - closed)

In this MR we update the elastic helper to use correct settings.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Enable Advanced Search
  2. Checkout master
  3. Update number of shards for gitlab-development, but keep it different from all other indices (for example, 10)
  4. Execute bin/rake gitlab:elastic:recreate_index
  5. Ensure that curl -s http://localhost:9200/gitlab-development/_settings | jq . | fgrep number_of_shards returns not the correct number of shards
  6. Checkout this MR's branch
  7. Execute bin/rake gitlab:elastic:recreate_index
  8. Ensure that curl -s http://localhost:9200/gitlab-development/_settings | jq . | fgrep number_of_shards returns the correct number of shards

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 #420347 (closed)

Edited by Dmitry Gruzd

Merge request reports

Loading