2020-09-25 11:09:36 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module Database
|
|
|
|
module Reindexing
|
|
|
|
def self.perform(index_selector)
|
2020-10-13 14:08:58 -04:00
|
|
|
Coordinator.new(index_selector).perform
|
2020-09-25 11:09:36 -04:00
|
|
|
end
|
2020-10-01 14:10:20 -04:00
|
|
|
|
|
|
|
def self.candidate_indexes
|
|
|
|
Gitlab::Database::PostgresIndex
|
|
|
|
.regular
|
2020-11-10 19:08:58 -05:00
|
|
|
.where('NOT expression')
|
2020-10-01 14:10:20 -04:00
|
|
|
.not_match("^#{ConcurrentReindex::TEMPORARY_INDEX_PREFIX}")
|
|
|
|
.not_match("^#{ConcurrentReindex::REPLACED_INDEX_PREFIX}")
|
|
|
|
end
|
2020-09-25 11:09:36 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|