Fully shard gpg_key_subkeys
Picks up on #553457 (closed) to gully shard the table.
Milestone %18.7
-
Prepare to shard table -> !214434
- add
user_idcolumn - index
user_idcolumn - add foreign key constraint (not valid) on
user_idcolumn - add a trigger on
user_idcolumn to backfill from parent tablegpg_keys - add a not null (not valid) constraint on the
user_idcolumn - backfill the
user_idcolumn using a single batched SQL update statement - test the backfill code
- update
db/docs/gpg_key_subkeys.ymlby replacingdesired_sharding_keywithsharding_key - update
spec/lib/gitlab/database/sharding_key_spec.rbto reflect the work in progress on the sharding key
- add
-
verify the backfill completed successfully
-
verify all rows have
user_id IS NOT NULLon .com -
validate foreign key constraint
Milestone %18.8 (required stop)
Milestone %18.9
-
Fully shard table - finalize sharding key backfill
- validate not null constraint on sharding key
Edited by Tomasz Skorupa