Skip to content

Add relaxed sharding keys for purchase

Manoj M J requested to merge determine-relaxed-sharding-key-purchase into master

Add relaxed sharding keys for feature category purchase.

These tables have been identified as cell local tables.

All cell local tables require a sharding key.

A "relaxed" sharding key has been automatically selected for these tables, referencing either projects or namespaces, or a combination of both.

The term "relaxed" is used because:

  • normally, a sharding key needs to have a NOT NULL constraint on the database.
  • But, "relaxed" sharding keys do not have NOT NULL constraints. However, we have verified via database-lab that these columns do not contain any NULL values across any rows in the table.

This means that while the NOT NULL constraint is missing, the data itself is clean, so we can always add a NOT NULL constraint after the classification of these tables are completed.

Reviwer, please confirm that each table should indeed be cell local, and that the selected column is an appropriate sharding key. When you are finished, please request a review from the database maintainer suggested by Danger.

If you have any questions or concerns, reach out to @manojmj or @tigerwnz.

If you would like to go through similar merged MRs so as to gather an understanding on this topic, you can use this link.

This change was generated by gitlab-housekeeper using the Keeps::DetermineRelaxedShardingKey keep.

To provide feedback on your experience with gitlab-housekeeper please comment in #442003.

Merge request reports