Remove hashed_root_namespace_id from users index documents
Background
The migration to add hashed_root_namespace_id
to users
index was reverted in !117300 (merged). The migration fully completed on staging and partially completed on production, it did not make the release (so no self managed impact). The revert removed the hashed_root_namespace_id
field from the users index mapping config file, but the data still exists in documents in staging and production gitlab-production-users
index.
When trying to do a manual reindex to resize shards, the reindexing failed due to a strict_dynamic_mapping_exception
error. The new users
index created by the reindexing service does not have the hashed_root_namespace_id
field but the documents do, hence the error when trying to move documents over.
Proposal
Create an advanced search migration to remove hashed_root_namespace_id
from the users
index using the Elastic::MigrationRemoveFieldsHelper
. This will be a no-op for self managd.