Adds hashed_root_namespace_id to issue index
What does this MR do and why?
Closes Issues: index hash value for root namespace id ... (#394854 - closed):
- Add
hashed_root_namespace_id
to issue index - Backfill
hashed_root_namespace_id
in issue index
Screenshots and Logs
{"severity":"INFO","time":"2023-03-17T10:34:11.091Z","correlation_id":null,"class":"Elastic::MigrationWorker","message":"MigrationWorker: migration[AddHashedRootNamespaceIdToIssues] executing migrate method","job_status":"running","queue":"default","jid":null}
{"severity":"INFO","time":"2023-03-17T10:34:11.102Z","correlation_id":null,"message":"[Elastic::Migration: 20230317120500] Adding {:hashed_root_namespace_id=\u003e{:type=\u003e\"integer\"}} to gitlab-development-issues mapping"}
{"severity":"INFO","time":"2023-03-17T10:34:11.332Z","correlation_id":null,"class":"Elastic::MigrationWorker","message":"MigrationWorker: migration[AddHashedRootNamespaceIdToIssues] updating with completed: true","job_status":"running","queue":"default","jid":null}
How to set up and validate locally
- Ensure elasticsearch is running
- Execute the migration worker a few times:
Elastic::MigrationWorker.new.perform
- Verify that all issues in Elasticsearch now have
hashed_root_namespace_id
andschema_version
is2303
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #394854 (closed)
Edited by Madelein van Niekerk