Skip to content
Snippets Groups Projects

Removes tmp_index_project_statistics_updated_at from project statistics

Merged 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) over a week ago 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 (closed)

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Vijay Hawoldar changed milestone to %17.1

    changed milestone to %17.1

  • assigned to @vij

  • Vijay Hawoldar changed the description

    changed the description

  • Database migrations (on the main database)

    Migrations included in this change have been executed on gitlab.com data for testing purposes. For details, please see the migration testing pipeline (limited access).

    Migration Type Total runtime Result DB size change
    20240611103909 - RemoveTmpIndexProjectStatisticsUpdatedAtSync Post deploy 5.2 s :white_check_mark: +0.00 B
    Runtime Histogram for all migrations
    Query Runtime Count
    0 seconds - 0.01 seconds 0
    0.01 seconds - 0.1 seconds 2
    0.1 seconds - 1 second 0
    1 second - 5 seconds 0
    5 seconds - 15 seconds 0
    15 seconds - 5 minutes 0
    5 minutes + 0

    Migration: 20240611103909 - RemoveTmpIndexProjectStatisticsUpdatedAtSync

    • Type: Post deploy
    • Duration: 5.2 s
    • Database size change: +0.00 B
    Calls Total Time Max Time Mean Time Rows Query
    2 0.0 ms 0.0 ms 0.0 ms 2
    SELECT pg_backend_pid()
    Histogram for RemoveTmpIndexProjectStatisticsUpdatedAtSync
    Query Runtime Count
    0 seconds - 0.01 seconds 0
    0.01 seconds - 0.1 seconds 2
    0.1 seconds - 1 second 0
    1 second - 5 seconds 0
    5 seconds - 15 seconds 0
    15 seconds - 5 minutes 0
    5 minutes + 0

    Other information

    Other migrations pending on GitLab.com
    Migration Type Total runtime Result DB size change
    20240604111157 - AddApprovalPolicyRulesFkOnApprovalGroupRules Post deploy 7.1 s :white_check_mark: +8.00 KiB [note]
    20240604111324 - AddApprovalPolicyRulesFkOnApprovalProjectRules Post deploy 6.6 s :white_check_mark: +0.00 B
    20240604111411 - AddApprovalPolicyRulesFkOnApprovalMergeRequestRules Post deploy 6.9 s :white_check_mark: +0.00 B
    20240604111512 - AddApprovalPolicyRulesFkOnSoftwareLicensePolicies Post deploy 6.1 s :white_check_mark: +0.00 B
    20240604111555 - AddApprovalPolicyRulesFkOnScanResultPolicyViolations Post deploy 6.0 s :white_check_mark: +0.00 B
    20240605080835 - RemovePartitionIdDefaultValueForCiPipelineMessage Post deploy 4.4 s :white_check_mark: +0.00 B
    Clone details
    Clone ID Clone Created At Clone Data Timestamp Expected Removal Time
    database-testing-3413742-14360486-main 2024-06-19T15:34:56Z 2024-06-19T12:08:10Z 2024-06-20 03:44:51 +0000
    database-testing-3413742-14360486-ci 2024-06-19T15:34:56Z 2024-06-19T12:45:20Z 2024-06-20 03:44:51 +0000

    Job artifacts

    Database migrations (on the ci database)

    Migrations included in this change have been executed on gitlab.com data for testing purposes. For details, please see the migration testing pipeline (limited access).

    Migration Type Total runtime Result DB size change
    20240611103909 - RemoveTmpIndexProjectStatisticsUpdatedAtSync Post deploy 7.3 s :white_check_mark: +0.00 B
    Runtime Histogram for all migrations
    Query Runtime Count
    0 seconds - 0.01 seconds 0
    0.01 seconds - 0.1 seconds 2
    0.1 seconds - 1 second 0
    1 second - 5 seconds 0
    5 seconds - 15 seconds 0
    15 seconds - 5 minutes 0
    5 minutes + 0

    Migration: 20240611103909 - RemoveTmpIndexProjectStatisticsUpdatedAtSync

    • Type: Post deploy
    • Duration: 7.3 s
    • Database size change: +0.00 B
    Calls Total Time Max Time Mean Time Rows Query
    2 0.0 ms 0.0 ms 0.0 ms 2
    SELECT pg_backend_pid()
    Histogram for RemoveTmpIndexProjectStatisticsUpdatedAtSync
    Query Runtime Count
    0 seconds - 0.01 seconds 0
    0.01 seconds - 0.1 seconds 2
    0.1 seconds - 1 second 0
    1 second - 5 seconds 0
    5 seconds - 15 seconds 0
    15 seconds - 5 minutes 0
    5 minutes + 0

    Other information

    Other migrations pending on GitLab.com
    Migration Type Total runtime Result DB size change
    20240604111157 - AddApprovalPolicyRulesFkOnApprovalGroupRules Post deploy 8.9 s :white_check_mark: +8.00 KiB [note]
    20240604111324 - AddApprovalPolicyRulesFkOnApprovalProjectRules Post deploy 8.5 s :white_check_mark: +0.00 B
    20240604111411 - AddApprovalPolicyRulesFkOnApprovalMergeRequestRules Post deploy 8.8 s :white_check_mark: +8.00 KiB [note]
    20240604111512 - AddApprovalPolicyRulesFkOnSoftwareLicensePolicies Post deploy 8.1 s :white_check_mark: +0.00 B
    20240604111555 - AddApprovalPolicyRulesFkOnScanResultPolicyViolations Post deploy 7.9 s :white_check_mark: +0.00 B
    20240605080835 - RemovePartitionIdDefaultValueForCiPipelineMessage Post deploy 6.5 s :white_check_mark: +0.00 B
    Clone details
    Clone ID Clone Created At Clone Data Timestamp Expected Removal Time
    database-testing-3413742-14360486-main 2024-06-19T15:34:56Z 2024-06-19T12:08:10Z 2024-06-20 03:44:51 +0000
    database-testing-3413742-14360486-ci 2024-06-19T15:34:56Z 2024-06-19T12:45:20Z 2024-06-20 03:44:51 +0000

    Job artifacts


    Brought to you by gitlab-org/database-team/gitlab-com-database-testing. Epic

    Edited by ****
  • 1 Warning
    :warning: You've made some app changes, but didn't add any tests.
    That's OK as long as you're refactoring existing code,
    but please consider adding any of the maintenancepipelines, maintenancerefactor, maintenanceworkflow, documentation, QA labels.

    Reviewer roulette

    Category Reviewer Maintainer
    database @abdwdd profile link current availability (UTC+5.5, 4.5 hours ahead of author) @mbobin profile link current availability (UTC+3, 2 hours ahead of author)

    Please check reviewer's status!

    • available Reviewer is available!
    • unavailable Reviewer is unavailable!

    Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.

    If needed, you can retry the :repeat: danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

    Edited by Ghost User
  • mentioned in issue #464566 (closed)

  • added 1 commit

    • 4f224148 - Removes temp index from project statistics

    Compare with previous version

  • Vijay Hawoldar added 1114 commits

    added 1114 commits

    Compare with previous version

  • Quarantined Fulfillment QA E2E Tests

    The following Fulfillment QA E2E tests are in quarantine. If your changes would be covered by these tests, please be sure to perform manual testing.

    Description Location
    Fulfillment without active subscription behaves like Purchase storage adds additional storage to group namespace ./qa/specs/features/ee/browser_ui/11_fulfillment/purchase/purchase_storage_spec.rb[1:1:1:1]
    Fulfillment with existing compute minutes packs behaves like Purchase storage adds additional storage to group namespace ./qa/specs/features/ee/browser_ui/11_fulfillment/purchase/purchase_storage_spec.rb[1:3:1:1]
    Fulfillment with an active subscription behaves like Purchase storage adds additional storage to group namespace ./qa/specs/features/ee/browser_ui/11_fulfillment/purchase/purchase_storage_spec.rb[1:2:1:1]
    Fulfillment Utilization when namespace storage usage hits the limit puts the namespace into read-only mode ./qa/specs/features/ee/browser_ui/11_fulfillment/utilization/namespace_storage_limit_spec.rb[1:1:1:1]
    Fulfillment Utilization when namespace storage usage goes back down below the limit reverts the namespace back to full-access mode ./qa/specs/features/ee/browser_ui/11_fulfillment/utilization/namespace_storage_limit_spec.rb[1:1:2:1]
    Fulfillment Utilization in usage quotas storage tab for free plan with a project shows correct used up storage for namespace ./qa/specs/features/ee/browser_ui/11_fulfillment/utilization/free_namespace_storage_spec.rb[1:1:1:1]
  • changed milestone to %17.2

  • Vijay Hawoldar added 754 commits

    added 754 commits

    Compare with previous version

  • added 1 commit

    • 4df42cdc - Update milestone in migration

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading