Skip to content

Add tmp indx null member namespace id

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

What does this MR do and why?

Describe in detail what your merge request does and why.

Add back in tmp idx on null member namespace id, remove it later

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

Comment with explanation: #365028 (comment 1108954620)

main: == 20220929081645 TmpIdxNullMemberNamespaceId: migrating ======================
main: -- transaction_open?()
main:    -> 0.0000s
main: -- index_exists?(:members, :member_namespace_id, {:name=>"tmp_index_for_null_member_namespace_id", :where=>"member_namespace_id IS NULL", :algorithm=>:concurrently})
main:    -> 0.0044s
main: -- add_index(:members, :member_namespace_id, {:name=>"tmp_index_for_null_member_namespace_id", :where=>"member_namespace_id IS NULL", :algorithm=>:concurrently})
main:    -> 0.0035s
main: == 20220929081645 TmpIdxNullMemberNamespaceId: migrated (0.0093s) =============



main: == 20220929081645 TmpIdxNullMemberNamespaceId: reverting ======================
main: -- transaction_open?()
main:    -> 0.0000s
main: -- indexes(:members)
main:    -> 0.0114s
main: -- execute("SET statement_timeout TO 0")
main:    -> 0.0002s
main: -- remove_index(:members, {:algorithm=>:concurrently, :name=>"tmp_index_for_null_member_namespace_id"})
main:    -> 0.0094s
main: -- execute("RESET statement_timeout")
main:    -> 0.0004s
main: == 20220929081645 TmpIdxNullMemberNamespaceId: reverted (0.0313s) =============

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