Commit 2f91804d authored by Andreas Brandl's avatar Andreas Brandl

Add feature flag for reindexing

parent 06c6774a
---
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
......@@ -169,6 +169,11 @@ namespace :gitlab do
desc 'reindex a regular (non-unique) index without downtime to eliminate bloat'
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]
Gitlab::Database::ConcurrentReindex.new(args[:index_name], logger: Logger.new(STDOUT)).execute
......
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