Reindex wikis to fix the id
What does this MR do and why?
Due to a bug Add prefix g or p in the wiki indices for id (gitlab-elasticsearch-indexer#140 - closed) the wikis might get the same id. The bug is already fixed and this MR is to force reindex all the wikis to fix the existing data.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
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
Ensure the elasticsearch is enabled
- Check if you already have wikis in the elasticsearch. Run the following curl command. And if count = 0 then create some wikis on the
master
branch. Check again that the following command gives a count > 0
curl -XGET "http://localhost:9200/gitlab-development-wikis/_count" -H "kbn-xsrf: reporting" -H "Content-Type: application/json" -d'
{
"query": {
"range": {
"schema_version": {
"lt": 2402
}
}
}
}'
- Open the rails console
bundle exec rails c
- Run the following command
Elastic::DataMigrationService[20240130215043].send(:migration).migrate
- Run again the curl command and verify that the count = 0
Run time
Related to #439377 (closed)
Edited by Ravi Kumar