Skip to content

`shards` table - Mark as exempt_from_sharding.

Background

See also https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/cells/impacted_features/git-access

The shards table holds the name of a shard / aka Gitaly storage.

In !152809 (merged), the table was declared gitlab_main_clusterwide.

This shards table is referenced by 4 other tables, all of which are gitlab_main_cell:

  • group_wiki_repositories
  • pool_repositories
  • project_repositories
  • snippet_repositories

Problem

When the dependent tables are moved by Org Mover, how should we handle the shards table ?

Screenshot_2024-12-11_at_5.55.27_PM

-- source

Each Cell will have its own unique Gitaly storages. By definition, the shards table will need to reflect these unique Gitaly storages.

After Org Mover moves a particular Gitaly repository from Cell A to Cell B, it will need to update the shard_id column

Action items

  • Mark shards table as exempt_from_sharding: true

Follow-ups

Edited by Thong Kuah