Org Data Migration: Performance testing for ci_job_artifact_states deletion during organization migration

🎯 Objective

Validate whether ci_job_artifact_states requires a sharding key for performant organization data deletion.

📋 Tasks

  • Figure out what a deletion for organization's data would look like-- an SRE running a script post-org-migration? Organization deletion is implemented in the GitLab application? Loose foreign key mechanism handles async deletion, when ci_job_artifacts rows are deleted?
  • Write a representative query which would end up deleting an organization's data in ci_job_artifact_states
  • If that query might be slow, then continue
  • Bulk insert representative test data into ci_job_artifact_states using Database Lab
  • Analyze query plan with bulk inserted data
  • Document findings and recommendation

📊 Success Criteria

Answer whether sharding key is needed for #566411. If it is needed, then we should have a clear statement of why it is needed.

🔗 Resources

🔗 Related

Edited by Michael Kozono