Tags as cell-local accelerant. Duplicate tag name
in source tables
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem statement
The tags
table is decided to be cell-local. In other words, Org mover will not move the tags
table.
So we will need to store the tag name
in other org tables so that we do not lose data when an org is moved.
Old description
@mbobin wrote:
tags
table - what's the plan here to set the sharding key? We still havesharding_key_issue_url
in the codebase.
gitlabhq_dblab=# \d+ tags
Table "public.tags"
Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description
----------------+------------------------+-----------+----------+----------------------------------+----------+-------------+--------------+-------------
id | integer | | not null | nextval('tags_id_seq'::regclass) | plain | | |
name | character varying(510) | | | NULL::character varying | extended | | |
taggings_count | integer | | | 0 | plain | | |
Action items
-
Refine and implement #470872 (comment 2382060671) -
p_ci_build_tags
will be replaced withci_job_definitions
-
%18.5: #570215 (closed) We add
ci_runner_taggings
withname
andtag_id
. It drops type to reduce space usage compared to currenttaggings
(polymorphic mapping).-
%18.5: #570217 (closed) Backfill
name
column - %18.6: #570754 Finalize migration
-
%18.5: #570217 (closed) Backfill
- When OrgMoving we do not migrate
tag_id
, this will be reconstructed later to deduplicate cell-local. - We retain
tags
as an cell-local acceleration table. -
%18.5: #547650 (closed) We drop
ci_runners.sharding_key
, instead addci_runners.organization_id
. -
We indirectly introduce a placeholder support for having organization-wide runners with having
ci_runners.organization_id
and later introducing additionalrunner_type=4
. - If we transfer project/group we will update
ci_runners.organization_id
as long as runner cross-join tables (ci_runner_projects
andci_runner_groups
) we allow or deny transfer. - The
ci_pending_builds
will upsertci_job_tags.name
into tags and continue usingtag_ids[]
. -
%18.6: #576030 The
jobs/request
will useci_runner_taggings.tag_id
to matchci_pending_builds.tag_ids[]
. - Convert FKs into
tags
from org tables into LFKs
-
Edited by Pedro Pombeiro - OOO from Oct 13-24