Skip to content

Removes tmp_index_project_statistics_updated_at from project statistics

Vijay Hawoldar requested to merge vij-remove-tmp-index-sync into master

What does this MR do and why?

Removes tmp_index_project_statistics_updated_at from project statistics.

It is a temporary index that was removed async in !154410 (diffs) last week

db:migrate up
main: == [advisory_lock_connection] object_id: 88780, pg_backend_pid: 77581
main: == 20240611103909 RemoveTmpIndexProjectStatisticsUpdatedAtSync: migrating =====
main: -- transaction_open?(nil)
main:    -> 0.0000s
main: -- view_exists?(:postgres_partitions)
main:    -> 0.0131s
main: -- indexes(:project_statistics)
main:    -> 0.0079s
main: -- current_schema(nil)
main:    -> 0.0002s
main: == 20240611103909 RemoveTmpIndexProjectStatisticsUpdatedAtSync: migrated (0.0437s) 

main: == [advisory_lock_connection] object_id: 88780, pg_backend_pid: 77581
db:migrate down
 bin/rails db:migrate:down:main VERSION=20240611103909
main: == [advisory_lock_connection] object_id: 88320, pg_backend_pid: 84570
main: == 20240611103909 RemoveTmpIndexProjectStatisticsUpdatedAtSync: reverting =====
main: -- transaction_open?(nil)
main:    -> 0.0000s
main: -- view_exists?(:postgres_partitions)
main:    -> 0.0119s
main: -- index_exists?(:project_statistics, [:project_id, :updated_at], {:name=>"tmp_index_project_statistics_updated_at", :where=>"repository_size > 0", :algorithm=>:concurrently})
main:    -> 0.0114s
main: -- execute("SET statement_timeout TO 0")
main:    -> 0.0002s
main: -- add_index(:project_statistics, [:project_id, :updated_at], {:name=>"tmp_index_project_statistics_updated_at", :where=>"repository_size > 0", :algorithm=>:concurrently})
main:    -> 0.0111s
main: -- execute("RESET statement_timeout")
main:    -> 0.0002s
main: == 20240611103909 RemoveTmpIndexProjectStatisticsUpdatedAtSync: reverted (0.0681s) 

Refs #464566

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

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

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Vijay Hawoldar

Merge request reports