S Add sharding key YAML config to p_ci_runner_machine_builds
What we need to do
The p_ci_runner_machine_builds has build_id, so we can add project_id and use ci_builds.project_id to backfill p_ci_runner_machine_builds
How to do it
-
Read https://docs.gitlab.com/ee/development/cells/#define-a-desired_sharding_key-to-automatically-backfill-a-sharding_key - It seems like the automation will not be able to handle composite keys (
build_id+partition_idin this case), so we'll need to implement the migrations manually
- It seems like the automation will not be able to handle composite keys (
-
Modify https://gitlab.com/gitlab-org/gitlab/-/blob/master/db/docs/p_ci_runner_machine_builds.yml -
Create all necessary migrations as we did in daed28a6, or add partition_columnto YAML once !163590 (merged) is merged.-
Add and backfill project_id for p_ci_runner_mac... (!164386 - merged) -
#483007 (closed): Create partitioned index synchronously -
#483011 (closed): Finalize BBM in %17.6 -
Validate `check_149ee35c38` constraint (#490474 - closed).
-
The table is quite big atm in .com:
gitlabhq_dblab> SELECT COUNT(*) FROM p_ci_runner_machine_builds
+-----------+
| count |
|-----------|
| 489909941 |
+-----------+
Edited by Pedro Pombeiro