Background Migration to populate GroupPushRule with historical PushRule records
What does this MR do and why?
This MR adds a batched background migration that will populate GroupPushRule table with
historical data from the PushRule table.
The initial work to fix the trigger so PushRule data can be copied as it has been merged here: !199043 (merged)
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Query Performance
- Total historical GroupPushRule currently in PushRule to be migrated:
230,896(https://console.postgres.ai/gitlab/gitlab-production-main/sessions/41906/commands/128527) - Select 100 PushRule records per sub-batch using a simulated query to return 100 records from the select query https://console.postgres.ai/gitlab/gitlab-production-main/sessions/41906/commands/128529
- Insert simulated 100 fetched PushRule records into GroupPushRule: https://console.postgres.ai/gitlab/gitlab-production-main/sessions/41906/commands/128530
Related to #498935 (closed)
Edited by Olaoluwa Oluro