XS Make ci_runner_namespaces sharding key non-nullable
The ci_runner_namespaces
table has been marked for sharding on namespace_id
, however it is currently classified with a "relaxed" sharding key, given that ci_runner_namespaces.namespace_id
is nullable (although we have no occurrences of NULL values in production). We'll need to follow the same procedure as #459996 to convert the field to non-nullable.
Screenshots
Proposal
- Milestone N
-
Add validations so that new invalid records cannot be created (!155756 (merged)) -
Remove affected rows since they are not serving any purpose at this point (they are not connecting the runner to any group, given that namespace_id
is null) (!155761 (merged))
-
- Milestone N + 1
-
Follow the instructions to change the column to non-nullable. -
Remove exception in spec/lib/gitlab/database/sharding_key_spec.rb
-
Edited by Pedro Pombeiro