diff --git a/db/docs/zoekt_nodes.yml b/db/docs/zoekt_nodes.yml index 2c0740d8b604480422ac8cdc2870b0e445e648e2..0a77bb785426490a5816ba2c8a8d7f35c9acf669 100644 --- a/db/docs/zoekt_nodes.yml +++ b/db/docs/zoekt_nodes.yml @@ -7,4 +7,5 @@ feature_categories: description: Describes a Zoekt server that will be used for indexing and search for some configured namespaces introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134901 milestone: '16.6' -gitlab_schema: gitlab_main +gitlab_schema: gitlab_main_cell +exempt_from_sharding: true diff --git a/spec/lib/gitlab/database/sharding_key_spec.rb b/spec/lib/gitlab/database/sharding_key_spec.rb index ee03e7c32990a7cdfee728e8a50e5be12639fa38..73b9bc125f2ebdde83682b064ae805eaf63d2767 100644 --- a/spec/lib/gitlab/database/sharding_key_spec.rb +++ b/spec/lib/gitlab/database/sharding_key_spec.rb @@ -217,6 +217,7 @@ def error_message(table_name) def tables_missing_sharding_key(starting_from_milestone:) ::Gitlab::Database::Dictionary.entries.filter_map do |entry| entry.table_name if entry.sharding_key.blank? && + !entry.exempt_from_sharding? && entry.milestone_greater_than_or_equal_to?(starting_from_milestone) && ::Gitlab::Database::GitlabSchema.cell_local?(entry.gitlab_schema) end