Invesitgate "MigrateSharedVulnerabilityIdentifiers" migration getting stuck in "active" state
Why this issue?
Extracted from slack convo: https://gitlab.slack.com/archives/C3NBYFJ6N/p1684136958715499 (internal)
MigrateSharedVulnerabilityIdentifiers migration (with id: 384) was merged on March 20. Because of accidental removal of the tmp index it was paused on April 3rd and resumed on April 13th (after creating the temporary index). It's still sitting at 0% in active state since then.
Expected behaviour
Batched migration to finish without getting stuck.
Side-effects
Since this is the earliest migration, it will block the execution of other migrations aiming the same table ('vulnerability_occurrences').
gitlabhq_dblab=# SELECT table_name, id, status, job_class_name FROM batched_background_migrations WHERE table_name = 'vulnerability_occurrences' AND (on_hold_until IS NULL OR on_hold_until < NOW()) AND status != 3 ORDER BY table_name ASC, id ASC;
table_name | id | status | job_class_name
---------------------------+-----+--------+------------------------------------------
vulnerability_occurrences | 384 | 1 | MigrateSharedVulnerabilityIdentifiers
vulnerability_occurrences | 390 | 1 | MigrateEvidencesForVulnerabilityFindings
vulnerability_occurrences | 393 | 1 | MigrateLinksForVulnerabilityFindings
(3 rows)