Skip to content

Add migration to cleanup audit_events backfill

Patrick Bair requested to merge 229903-audit-events-post-backfill-migration into master

What does this MR do?

Migration to call the partitioning migration helper that cleans up after the background migration used to backfill the audit_events table.

For details on that migration helper, see: !35201 (merged) and related issue #229903 (closed)

On GitLab.com, all the background jobs were completed successfully, so this won't have any missed records to copy.

 select status, count(*) from background_migration_jobs group by 1;
 status | count
--------+-------
      1 |  6909

Migration Output

up
rails db:migrate:up VERSION=20200904174901
== 20200904174901 BackfillCleanupForPartitionedAuditEvents: migrating =========
-- transaction_open?()
   -> 0.0000s
-- table_exists?("audit_events_part_5fc467ac26")
   -> 0.0004s
-- execute("VACUUM FREEZE ANALYZE audit_events_part_5fc467ac26")
   -> 0.0149s
== 20200904174901 BackfillCleanupForPartitionedAuditEvents: migrated (0.0750s)
down
rails db:migrate:down VERSION=20200904174901
== 20200904174901 BackfillCleanupForPartitionedAuditEvents: reverting =========
== 20200904174901 BackfillCleanupForPartitionedAuditEvents: reverted (0.0000s)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Patrick Bair

Merge request reports

Loading