Commit ebef7c33 authored by Alex Pooley's avatar Alex Pooley

Merge branch 'if-avoid_duplicate_root_ancestor_calls_during_sync_traversal_ids' into 'master'

Avoid duplicate root ancestor calculation when syncing traversal_ids

See merge request gitlab-org/gitlab!65480
parents 2873e98c ca2b4bfa
......@@ -144,8 +144,7 @@ module Namespaces
# Clear any previously memoized root_ancestor as our ancestors have changed.
clear_memoization(:root_ancestor)
# We cannot rely on Namespaces::Traversal::Linear#root_ancestor because it might be stale
Namespace::TraversalHierarchy.for_namespace(recursive_root_ancestor).sync_traversal_ids!
Namespace::TraversalHierarchy.for_namespace(self).sync_traversal_ids!
end
# Lock the root of the hierarchy we just left, and lock the root of the hierarchy
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment