Commit c9aeafbf authored by Jan Provaznik's avatar Jan Provaznik

Remove preset_root_ancestor_for_labels flag

This flag was tested in production w/o issues.
parent 4b76d7e0
...@@ -102,7 +102,7 @@ class LabelsFinder < UnionFinder ...@@ -102,7 +102,7 @@ class LabelsFinder < UnionFinder
# Because we are sure that all groups are in the same hierarchy tree # Because we are sure that all groups are in the same hierarchy tree
# we can preset root group for all of them to optimize permission checks # we can preset root group for all of them to optimize permission checks
Group.preset_root_ancestor_for(groups) if Feature.enabled?(:preset_root_ancestor_for_labels, group) Group.preset_root_ancestor_for(groups)
groups_user_can_read_labels(groups).map(&:id) groups_user_can_read_labels(groups).map(&:id)
end end
......
---
title: Optimized loading of descendant group labels
merge_request: 53356
author:
type: performance
---
name: preset_root_ancestor_for_labels
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/52236
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/299521
milestone: '13.9'
type: development
group: group::plan
default_enabled: false
...@@ -21,20 +21,6 @@ RSpec.describe 'view audit events' do ...@@ -21,20 +21,6 @@ RSpec.describe 'view audit events' do
expect { send_request }.not_to exceed_all_query_limit(control) expect { send_request }.not_to exceed_all_query_limit(control)
end end
context 'when preset_root_ancestor_for_labels flag is disabled' do
before do
stub_feature_flags(preset_root_ancestor_for_labels: false)
end
it 'does additional N+1 DB queries', :request_store do
control = ActiveRecord::QueryRecorder.new(skip_cached: false) { send_request }
create_list(:group, 3, parent: group)
expect { send_request }.to exceed_all_query_limit(control)
end
end
def send_request def send_request
get group_labels_path(group, include_descendant_groups: true, format: :json) get group_labels_path(group, include_descendant_groups: true, format: :json)
end end
......
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