[go: up one dir, main page]

Skip to content

Re-classify bulk_imports as gitlab_main_cell with an appropriate sharding key and investigate if other tables have not been classified correctly

It appears that bulk_imports may not be classified correctly for the sharding required for Cells:

Given the FK constraints, we need ensure all related tables have sharding keys. For example bulk_imports needs a sharding key (and re-classified as gitlab_main_cell)

- @tkuah in #463854 (comment 2165117931)

We should re-classify this table, set the appropriate sharding keys, and check to see if there are any other tables related to importers that should also be re-classified.

As part of this work, we also need to ensure that a bulk_imports record is not referenced by bulk_import_entities belonging to different organizations.

The bulk_import_configurations also needs a sharding key set, based on what is decided with the bulk_imports. So this should be updated as part of this issue as well.

Implementation Plan

  • Create an organization_id for bulk_imports
  • When creating new BulkImport from the API, validate that all the BulkImports::Entity belong to the same organization
  • Update db/docs/bulk_imports.yml and db/docs/bulk_import_configurations.yml with the correct sharding keys
Edited by Keeyan Nejad