Shard user_agent_details table
Action Required: Classify the user_agent_details table
To properly configure the user_agent_details 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 user_agent_details 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_keyordesired_sharding_key. - If the key doesn't yet meet
not-nullor 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
2. Complete the Task
- Add this issue to the epic: &11670
- Review the documentation below for more details.
Documentation
Tasks
-
Add
organization_idtouser_agent_detailstable Add organization_id to user_agent_details table (!211645 - merged) • mo khan • 18.6 -
Backfill data in
organization_idcolumn Backfill `user_agent_details.organization_id` (!215327) • mo khan • 18.7 -
Add
NOT NULLconstraint toorganization_idAdd constraints to `user_agent_details.organiza... (!215849) • mo khan • 18.8 - Add migration to validate check constraint %18.9
-
Update
user_agent_details.ymltable definition file withsharding_key:
Edited by mo khan