Skip to content

Finalize indexes for ci_job_artifacts expire_at_and_unlocked

What does this MR do and why?

This finalizes the ci_job_artifacts_expire_at_unlocked_idx index which was created for SaaS asynchronously in !68893 (merged)

This is the final step in the process to Create indexes asynchronously.

Database

Up:

== 20211006145004 FinalizeIndexesForCiJobArtifactsExpireAtUnlocked: migrating =
-- transaction_open?()
   -> 0.0000s
-- index_exists?("ci_job_artifacts", [:expire_at], {:where=>"locked = 0", :name=>"ci_job_artifacts_expire_at_unlocked_idx", :algorithm=>:concurrently})
   -> 0.0044s
-- execute("SET statement_timeout TO 0")
   -> 0.0004s
-- add_index("ci_job_artifacts", [:expire_at], {:where=>"locked = 0", :name=>"ci_job_artifacts_expire_at_unlocked_idx", :algorithm=>:concurrently})
   -> 0.0104s
-- execute("RESET statement_timeout")
   -> 0.0005s
== 20211006145004 FinalizeIndexesForCiJobArtifactsExpireAtUnlocked: migrated (0.0196s) 

Down:

== 20211006145004 FinalizeIndexesForCiJobArtifactsExpireAtUnlocked: reverting =
-- transaction_open?()
   -> 0.0000s
-- indexes("ci_job_artifacts")
   -> 0.0045s
-- execute("SET statement_timeout TO 0")
   -> 0.0004s
-- remove_index("ci_job_artifacts", {:algorithm=>:concurrently, :name=>"ci_job_artifacts_expire_at_unlocked_idx"})
   -> 0.0225s
-- execute("RESET statement_timeout")
   -> 0.0005s
== 20211006145004 FinalizeIndexesForCiJobArtifactsExpireAtUnlocked: reverted (0.0314s) 

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 #327281 (closed)

Edited by Matt Kasa

Merge request reports

Loading