Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f088ff8c
Commit
f088ff8c
authored
Sep 01, 2020
by
gaga5lala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove attempt_group_search_optimizations feature flag
parent
e492d82c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
26 deletions
+4
-26
app/finders/issuable_finder.rb
app/finders/issuable_finder.rb
+3
-4
ee/app/finders/epics_finder.rb
ee/app/finders/epics_finder.rb
+1
-2
spec/controllers/groups_controller_spec.rb
spec/controllers/groups_controller_spec.rb
+0
-4
spec/finders/issues_finder_spec.rb
spec/finders/issues_finder_spec.rb
+0
-16
No files found.
app/finders/issuable_finder.rb
View file @
f088ff8c
...
...
@@ -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
enabl
ing the
# attempt_group_search_optimizations
feature flag
# for counts by passing the force_cte param and
pass
ing 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?
...
...
ee/app/finders/epics_finder.rb
View file @
f088ff8c
...
...
@@ -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
)
...
...
spec/controllers/groups_controller_spec.rb
View file @
f088ff8c
...
...
@@ -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'
}
...
...
spec/finders/issues_finder_spec.rb
View file @
f088ff8c
...
...
@@ -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
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment