Welcome to mirror list, hosted at ThFree Co, Russian Federation.

fill_shards.rb « initializers « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 40a9a2719535e934b0c1d92740f1310023c0bcb9 (plain)
1
2
3
4
5
6
7
8
# The `table_exists?` check is needed because during our migration rollback testing,
# `Shard.connected?` could be cached and return true even though the table doesn't exist
return unless Shard.connected?
return unless Shard.table_exists?
return unless Shard.connection.index_exists?(:shards, :name, unique: true)
return if Gitlab::Database.read_only?

Shard.populate!