Skip to content

Re-do swapping columns for ci_pipelines

Tianwen Chen requested to merge 422810-swap-v2 into master

What does this MR do and why?

There was an incident (at here) that failed the migration to swap columns ci_pipelines.auto_canceled_by_id and ci_pipelines.auto_canceled_by_id_convert_to_bigint. The cause is that the wraparound prevention autovacuum was running on ci_pipelines and prevented other process from acquiring the ACCESS EXCLUSIVE lock on table ci_pipelines. Therefore, the migration failed to obtain the required locks on ci_pipelines and blocked the other post deployment migrations.

This is to re-introduce the migration to swap bigint conversion columns for ci_pipelines.

  • auto_canceled_by_id
  • auto_canceled_by_id_convert_to_bigint

The difference of this migration is that it checks whether there is any autovacuum running on the table ci_pipelines so that it won't fail if the autovacuum prevents the locks from being acquired and therefore block the other migrations.

See:

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

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

MR acceptance checklist

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

Related to #422810 (closed)

Edited by Tianwen Chen

Merge request reports