Migrate issue tracker data to data field tables
What does this MR do?
Original migration - !18639 (merged) failed due to problems with attr_encrypted
gem. The problem has been (hopefully) fixed in !23955 (merged).
This reschedules the migration and additionally adds down
part for a case we hit the issue again.
GitLab.com stats
We have around ~26K records that will be affected by this migration:
Aggregate (cost=501578.31..501578.32 rows=1 width=8) (actual time=3660.274..3660.275 rows=1 loops=1)
Buffers: shared hit=9219 read=100535
I/O Timings: read=2209.912
-> Seq Scan on services (cost=0.00..499618.62 rows=783875 width=0) (actual time=1.796..3657.238 rows=26539 loops=1)
Filter: ((properties IS NOT NULL) AND (properties <> '{}'::text) AND (properties <> ''::text) AND ((category)::text = 'issue_tracker'::text))
Rows Removed by Filter: 3444030
Buffers: shared hit=9219 read=100535
I/O Timings: read=2209.912
Planning time: 1.684 ms
Execution time: 3660.392 ms
Running time
- the execution is quite fast, took less than 1 second for a batch of 1000 records and about 3 seconds for a batch of 5000
- I think we can safely schedule batches of 5000 with 3 minutes delay
27_000/5000
=> 5 # batches
5 * 3.minutes
=> 15 minutes
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides - [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Edited by Mayra Cabrera