Skip to content

Fix migrations to drop user_interacted_projects table

Missy Davies requested to merge md-fix-table-drop-incident into master

What does this MR do and why?

In !139630 (comment 1781181642) we introduced migrations to remove the relevant foreign keys and drop the user_interacted_projects table. This caused a minor incident (gitlab-com/gl-infra/production#17622 (closed)) due to the foreign keys referencing to two different high-traffic tables (users, projects) which caused a deadlock. This MR addresses the incident by re-introducing the migrations with added with_lock_retries for each foreign key.

To merge after !145293 (merged)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Missy Davies

Merge request reports