Replace ci_runners with partitioned table
Once all the data is in place, we need to follow the last step in the process and call replace_with_partitioned_table and set Ci::Runner.primary_key = [:id, :runner_type] so that all future data is read/written to the partitioned table.
- Adapt FKs:
-
ci_running_builds.runner_idwill need to point toci_runners_e59bb2812d - Instance runners:
-
Make ci_cost_settings'sfk_rails_6a70651f75referenceinstance_type_ci_runners_e59bb2812dtable, since this table only applies to instance runners.
-
- Group runners:
-
Add an LFK pointing to namespaces. -
Make ci_runner_namespaces'sfk_rails_8767676b7areferencegroup_type_ci_runners_e59bb2812dtable, since this table only applies to group runners.
-
- Project runners:
-
Add an LFK pointing to projects. -
ci_runner_projectsdoesn't have a FK pointing toci_runners. We can add a new FK pointing toproject_type_ci_runners_e59bb2812d, after ensuring that no records exist that point to missing project runners.
-
-
Links
Spike MR demonstrating process: Draft: Spike for replacement of partitioned run... (!179605 - closed)
Edited by Pedro Pombeiro