Skip to content

Ignore unknown sequences in sequence fix migration

Stan Hu requested to merge sh-backport-migration-fix-17-2 into 17-2-stable-ee

What does this MR do and why?

This backports !160609 (merged) to 17-2-stable-ee to fix an upgrade problem described in #474293 (closed).

GitLab 17.2.1 included a migration to fix the wrong owners of sequences (!160139 (merged)). Unfortunately due to a bug in the sequences_owned_by query described in #468541 (comment 2013158432), some sequences may have been assigned the wrong owner and not automatically dropped when its associated table was dropped.

For example, for one customer geo_reset_checksum_events_id_seq was assigned to the wrong owner (p_ci_builds.partition_id), so when geo_reset_checksum_events was dropped in GitLab 17.0 via !151938 (merged), the sequence remained in the database. We could remove these unused sequences, but that should probably be done by a different migration (UPDATE: done in !160624 (merged)). For now, ignoring these sequences is the safest way to handle this.

Relates to #474293 (closed)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

  • This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch.
  • The MR that fixed the bug on the default branch has been deployed to GitLab.com (not applicable for documentation or spec changes).
  • This MR has a severity label assigned (if applicable).
  • Set the milestone of the merge request to match the target backport branch version.
  • This MR has been approved by a maintainer (only one approval is required).
  • Ensure the e2e:package-and-test-ee job has either succeeded or been approved by a Software Engineer in Test.

Note to the merge request author and maintainer

If you have questions about the patch release process, please:

Edited by Adam Hegyi

Merge request reports

Loading