Skip to content

Restore index for contribution analytics

What does this MR do and why?

This MR restores the previously (via async migration) removed index which supports the Contribution Analytics feature. This only affects production, the index was only removed there.

Previous MR (removal): !122368 (merged)

Note: self-managed is not affected since the index removal was not persisted.

DB

Up:

main: == 20230614073136 RestoreIndexForContributionAnalyticsEvents: migrating =======
main: -- index_exists?(:events, [:project_id, :target_type, :action, :created_at, :author_id, :id], {:name=>"index_on_events_to_improve_contribution_analytics_performance", :algorithm=>:concurrently})
main:    -> 0.0109s
main: -- add_index_options(:events, [:project_id, :target_type, :action, :created_at, :author_id, :id], {:name=>"index_on_events_to_improve_contribution_analytics_performance", :algorithm=>:concurrently})
main:    -> 0.0003s
main: == 20230614073136 RestoreIndexForContributionAnalyticsEvents: migrated (0.0812s)

ci: == 20230614073136 RestoreIndexForContributionAnalyticsEvents: migrating =======
ci: -- index_exists?(:events, [:project_id, :target_type, :action, :created_at, :author_id, :id], {:name=>"index_on_events_to_improve_contribution_analytics_performance", :algorithm=>:concurrently})
ci:    -> 0.0119s
ci: == 20230614073136 RestoreIndexForContributionAnalyticsEvents: migrated (0.0268s)

Down:

main: == 20230614073136 RestoreIndexForContributionAnalyticsEvents: reverting =======
main: == 20230614073136 RestoreIndexForContributionAnalyticsEvents: reverted (0.0700s)


ci: == 20230614073136 RestoreIndexForContributionAnalyticsEvents: reverting =======
ci: == 20230614073136 RestoreIndexForContributionAnalyticsEvents: reverted (0.0816s)

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

Merge request reports