Skip to content

Add unique index to ci_builds

Max Orefice requested to merge morefice/add-unique-index-ci-builds into master

Ref: #382033 (closed)

What does this MR do and why?

Following up gitlab-com/gl-infra/production#8235 (closed) where we successfully introduced a new index during low traffic this weekend.

This MR adds a migration which will create an index for users outside of gitlab.com as explained in our documentation.

This will be no-op operation gitlab.com.

Why are we doing this?

This index is required in order to partition ci_builds as the all unique constraints must include the partition key in order to be able to partition our table.

Database queries

  • Verification that our indexes exist on production

MR acceptance checklist

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

Edited by Max Orefice

Merge request reports