Commit 1948210f authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'gaga5lala/remove-feature-flag' into 'master'

remove attempt_group_search_optimizations feature flag

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