Skip to content

Draft: Delete search index assignments to namespaces that are no longer root

John Mason requested to merge jm-namespace-traversal-ids-change-events into master

What does this MR do and why?

Whenever a namespace's traversal_ids are changed, this creates a Namespaces::TraversalIdsChangedEvent to Gitlab::EventStore. We use the event to remove any search index assignments that are attached to a namespace that is no longer root.

In a future iteration, we will most likely use active record callbacks for after_destroy to handle what happens to Elasticsearch documents in a specific namespace when the index assignment for that namespace is destroyed.

Screenshots or screen recordings

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

How to set up and validate locally

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

MR acceptance checklist

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

Edited by John Mason

Merge request reports