Skip to content

Remove duplicate index on cluster_agents

What does this MR do?

Removes a redundant cluster_agents index on project_id

    "index_cluster_agents_on_project_id_and_name" UNIQUE, btree (project_id, name)
    "index_cluster_agents_on_project_id" btree (project_id)

Output

== 20200921203231 RemoveDuplicateClusterAgentsIndex: reverting ================
-- transaction_open?()
   -> 0.0000s
-- index_exists?(:cluster_agents, :project_id, {:name=>"index_cluster_agents_on_project_id", :algorithm=>:concurrently})
   -> 0.0030s
-- execute("SET statement_timeout TO 0")
   -> 0.0002s
-- add_index(:cluster_agents, :project_id, {:name=>"index_cluster_agents_on_project_id", :algorithm=>:concurrently})
   -> 0.0047s
-- execute("RESET ALL")
   -> 0.0003s
== 20200921203231 RemoveDuplicateClusterAgentsIndex: reverted (0.0087s) =======

== 20200921203231 RemoveDuplicateClusterAgentsIndex: migrating ================
-- transaction_open?()
   -> 0.0000s
-- indexes(:cluster_agents)
   -> 0.0033s
-- execute("SET statement_timeout TO 0")
   -> 0.0002s
-- remove_index(:cluster_agents, {:algorithm=>:concurrently, :name=>"index_cluster_agents_on_project_id"})
   -> 0.0035s
-- execute("RESET ALL")
   -> 0.0002s
== 20200921203231 RemoveDuplicateClusterAgentsIndex: migrated (0.0078s) =======

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

#244484 (closed)

Edited by Tiger Watson

Merge request reports

Loading