Add sharding key information to Geo upload_states table
What does this MR do and why?
This change updates the database configuration for a table that tracks file upload verification data used by GitLab's Geo replication feature. The main updates include:
-
Schema change: Moved the table from a "cell-local" schema to an "organization" schema, indicating it will now be organized differently in the database structure.
-
Added sharding configuration: Introduced three new ways to partition the data across multiple database instances based on project_id, namespace_id, and organization_id. This will help distribute the data load and improve performance as the system scales.
-
Backfill strategy: Defined how existing data will be migrated to use these new partitioning keys by referencing the parent "uploads" table, ensuring data consistency during the transition.
-
Minor formatting: Fixed indentation in the YAML configuration file.
These changes prepare the upload verification system to work better with GitLab's evolving database architecture, particularly around how data is organized by organizations and distributed across multiple database shards for better performance and scalability.
References
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.