Sharding Key Investigation for abuse_trust_scores
table
abuse_trust_scores
table
Action Required: Classify the To properly configure the abuse_trust_scores
table, please choose the one classification below that best fits its data and purpose. This choice will determine the table's database schema and sharding key.
After selecting the best option, remove the sharding_key_issue_url
and apply the corresponding configuration.
1. Choose a Classification
Select the most suitable option for the abuse_trust_scores
table from the following:
A. Org-level with sharding key
This is for data that belongs to an entire organization.
-
Action:
- Set
gitlab_schema: gitlab_main_cell
. - Add the
sharding_key
ordesired_sharding_key
. - If the key doesn't yet meet
not-null
or foreign key requirements, you can add a temporary exception. Please link to a follow-up issue in a comment next to the exception. -
See an example at
db/docs/epics.yml
.
- Set
B. Cell-local
This is for data related to cell-specific features.
-
Action:
- Set
gitlab_schema: gitlab_main_cell_local
. - Ensure there are no foreign key references to or from organization-level tables.
- Set
C. User-related
This is for data that is strictly and exclusively owned by a user.
-
Action:
- Set
gitlab_schema: gitlab_main_user
. - Confirm the table's data belongs only to users.
- Set
D. Cell settings
This is for configuration settings that are specific to a single cell.
-
Action:
- Set
gitlab_schema: gitlab_main_cell_setting
. - Ensure there are no foreign key references to or from organization-level tables.
- Set
Note: gitlab_main_clusterwide
has been deprecated. If you believe this is the correct classification, please consult the Tenant Scale group for alternatives.
2. Complete the Task
- Add this issue to the epic: &11670
- Review the documentation below for more details.