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
2f91804d
Commit
2f91804d
authored
Sep 18, 2020
by
Andreas Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature flag for reindexing
parent
06c6774a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
config/feature_flags/ops/database_reindexing.yml
config/feature_flags/ops/database_reindexing.yml
+7
-0
lib/tasks/gitlab/db.rake
lib/tasks/gitlab/db.rake
+5
-0
No files found.
config/feature_flags/ops/database_reindexing.yml
0 → 100644
View file @
2f91804d
---
name
:
database_reindexing
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42705
rollout_issue_url
:
group
:
group::database
type
:
ops
default_enabled
:
false
\ No newline at end of file
lib/tasks/gitlab/db.rake
View file @
2f91804d
...
@@ -169,6 +169,11 @@ namespace :gitlab do
...
@@ -169,6 +169,11 @@ namespace :gitlab do
desc
'reindex a regular (non-unique) index without downtime to eliminate bloat'
desc
'reindex a regular (non-unique) index without downtime to eliminate bloat'
task
:reindex
,
[
:index_name
]
=>
:environment
do
|
_
,
args
|
task
:reindex
,
[
:index_name
]
=>
:environment
do
|
_
,
args
|
unless
Feature
.
enabled?
(
:database_reindexing
,
type: :ops
)
puts
"This feature (database_reindexing) is currently disabled."
.
yellow
exit
end
raise
ArgumentError
,
'must give the index name to reindex'
unless
args
[
:index_name
]
raise
ArgumentError
,
'must give the index name to reindex'
unless
args
[
:index_name
]
Gitlab
::
Database
::
ConcurrentReindex
.
new
(
args
[
:index_name
],
logger:
Logger
.
new
(
STDOUT
)).
execute
Gitlab
::
Database
::
ConcurrentReindex
.
new
(
args
[
:index_name
],
logger:
Logger
.
new
(
STDOUT
)).
execute
...
...
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