Sharding Key Implementation for x509_issuers table
Roadmap
Last update: 2025-10-30
| Step | MR | Status | Timeline |
|---|---|---|---|
| General test refactoring | !206547 (merged) | workflowcomplete | 18.5 |
Extend both tables with project_id columns: |
!206542 (merged) | workflowcomplete | 18.5 |
Populate project_id for new signatures |
!206668 (merged) | workflowcomplete | 18.5 |
Backfill historical records with project_id
|
!206669 (merged) | workflowcomplete | 18.5 |
| Finalize backfill migration | !207068 | workflowin review | 18.6 |
| Remove x509 records with NULL project_id | !210875 | workflowin review | 18.6 |
Make project_id columns NOT NULL |
!207072 | 18.6 | |
| Set sharding_key for both tables | !206673 | 18.6 |
Action Required: Classify the x509_issuers table
To properly configure the x509_issuers 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 x509_issuers 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
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.