Set traversal_ids for every namespace
Perform the following data migration on every environment except staging, which has already completed.
return if Gitlab.staging?
Namespace.where(parent: nil).find_each do |namespace|
TraversalHierarchy.new(namespace).sync_traversal_ids!
end
We need to take this migration slowly otherwise we risk breaking database performance.
In terms of roll out, we must proceed in this order:
- Enable the
:sync_traversal_ids
FF. Ensure the:use_traversal_ids
FF is false. - Wait until this migration completes.
- Enable the
:use_traversal_ids
FF
Edited by Alex Pooley