Skip to content

Create tmp index members on id where namespace id null

Serena Fang requested to merge add-tmp-index-member-namespace-id-null into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Create tmp index members on id where namespace id null

Incident: gitlab-com/gl-infra/production#7779 (closed)

Comment with explanation: #365028 (comment 1108954620), !99467 (comment 1122132537)

% rails db:migrate             
main: == 20221004092038 TmpIndexMembersOnIdWhereNamespaceIdNull: migrating ==========
main: -- transaction_open?()
main:    -> 0.0000s
main: -- index_exists?(:members, :id, {:name=>"tmp_index_members_on_id_where_namespace_id_null", :where=>"member_namespace_id IS NULL", :algorithm=>:concurrently})
main:    -> 0.0076s
main: -- execute("SET statement_timeout TO 0")
main:    -> 0.0002s
main: -- add_index(:members, :id, {:name=>"tmp_index_members_on_id_where_namespace_id_null", :where=>"member_namespace_id IS NULL", :algorithm=>:concurrently})
main:    -> 0.0023s
main: -- execute("RESET statement_timeout")
main:    -> 0.0002s
main: == 20221004092038 TmpIndexMembersOnIdWhereNamespaceIdNull: migrated (0.0149s) =



% rails db:rollback:main STEP=1
main: == 20221004092038 TmpIndexMembersOnIdWhereNamespaceIdNull: reverting ==========
main: -- transaction_open?()
main:    -> 0.0000s
main: -- indexes(:members)
main:    -> 0.0091s
main: -- execute("SET statement_timeout TO 0")
main:    -> 0.0002s
main: -- remove_index(:members, {:algorithm=>:concurrently, :name=>"tmp_index_members_on_id_where_namespace_id_null"})
main:    -> 0.0012s
main: -- execute("RESET statement_timeout")
main:    -> 0.0002s
main: == 20221004092038 TmpIndexMembersOnIdWhereNamespaceIdNull: reverted (0.0162s) =

Screenshots or screen recordings

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

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.

Edited by Serena Fang

Merge request reports

Loading