Skip to content

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

  1. Ensure elasticsearch is running
  2. Execute the migration worker a few times: Elastic::MigrationWorker.new.perform
  3. Verify that all issues in Elasticsearch now have hashed_root_namespace_id and schema_version is 2303

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

Edited by Madelein van Niekerk

Merge request reports

Loading