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:
tagstable - what's the plan here to set the sharding key? We still havesharding_key_issue_urlin 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_tagswill be replaced withci_job_definitions -
%18.5: #570215 (closed) We add
ci_runner_taggingswithnameandtag_id. It drops type to reduce space usage compared to currenttaggings(polymorphic mapping).-
%18.5: #570217 (closed) Backfill
namecolumn - %18.6: #570754 (closed) 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
tagsas 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_idand later introducing additionalrunner_type=4. - If we transfer project/group we will update
ci_runners.organization_idas long as runner cross-join tables (ci_runner_projectsandci_runner_groups) we allow or deny transfer. -
%18.6: #578669 The
ci_pending_buildswill upsertci_job_tags.nameintotagsand continue usingtag_ids[]. -
%18.6: #576030 The
jobs/requestwill useci_runner_taggings.tag_idto matchci_pending_builds.tag_ids[]. -
%18.7: #578702 Convert FKs into
tagsfrom org tables into LFKs
-
Edited by Pedro Pombeiro