Commit f088ff8c authored by gaga5lala's avatar gaga5lala

Remove attempt_group_search_optimizations feature flag

parent e492d82c
......@@ -103,8 +103,8 @@ class IssuableFinder
items = filter_negated_items(items)
# This has to be last as we use a CTE as an optimization fence
# for counts by passing the force_cte param and enabling the
# attempt_group_search_optimizations feature flag
# for counts by passing the force_cte param and passing the
# attempt_group_search_optimizations param
# https://www.postgresql.org/docs/current/static/queries-with.html
items = by_search(items)
......@@ -229,8 +229,7 @@ class IssuableFinder
end
def attempt_group_search_optimizations?
params[:attempt_group_search_optimizations] &&
Feature.enabled?(:attempt_group_search_optimizations, default_enabled: true)
params[:attempt_group_search_optimizations]
end
def attempt_project_search_optimizations?
......
......@@ -65,8 +65,7 @@ class EpicsFinder < IssuableFinder
items = filter_negated_items(items)
# This has to be last as we use a CTE as an optimization fence
# for counts by passing the force_cte param and enabling the
# attempt_group_search_optimizations feature flag
# for counts by passing the force_cte param
# https://www.postgresql.org/docs/current/static/queries-with.html
items = by_search(items)
......
......@@ -422,10 +422,6 @@ RSpec.describe GroupsController do
end
context 'searching' do
before do
stub_feature_flags(attempt_group_search_optimizations: true)
end
it 'works with popularity sort' do
get :issues, params: { id: group.to_param, search: 'foo', sort: 'popularity' }
......
......@@ -949,10 +949,6 @@ RSpec.describe IssuesFinder do
describe '#use_cte_for_search?' do
let(:finder) { described_class.new(nil, params) }
before do
stub_feature_flags(attempt_group_search_optimizations: true)
end
context 'when there is no search param' do
let(:params) { { attempt_group_search_optimizations: true } }
......@@ -969,18 +965,6 @@ RSpec.describe IssuesFinder do
end
end
context 'when the attempt_group_search_optimizations flag is disabled' do
let(:params) { { search: 'foo', attempt_group_search_optimizations: true } }
before do
stub_feature_flags(attempt_group_search_optimizations: false)
end
it 'returns false' do
expect(finder.use_cte_for_search?).to be_falsey
end
end
context 'when attempt_group_search_optimizations is unset and attempt_project_search_optimizations is set' do
let(:params) { { search: 'foo', attempt_project_search_optimizations: true } }
......
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