Skip to content

Drop unique index on ci_job_artifacts

Ref: #429002 (closed)

What does this MR do and why?

Following up !138620 (merged) where we introduced a new index including the partition key as you can see on production.

This MR removes the old unique index which does not include the partition key.

- "index_ci_job_artifacts_on_job_id_and_file_type" UNIQUE, btree (job_id, file_type)
+ "idx_ci_job_artifacts_on_job_id_file_type_and_partition_id_uniq" UNIQUE, btree (job_id, file_type, partition_id)

Why are we doing this?

Those indexes are required in order to partition ci_job_artifacts as the primary key and all unique constraints should include the partition key in order to be able to partition our table.

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

Loading