You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tombstone dry run with target DB in GCP (1st run) #26058
A dry run of the production dataset was done with a setup similar to what the final migration looks like. The run took just over 24 hours and successfully migrated 634911 corps. Note that this run excluded TEDs as there were issues with these in the preliminary run and I just excluded them until some further investigation takes place.
In general, I think we can increase the throughput more with some tweaks but this first run gives us an initial baseline.
Tombstone pipeline setup
Locally hosted components
Source database(CPRD postgres extract)
Prefect server
Temp GCP target database(pre-populated from LEAR prod dump). Direct connection was used
Specific Tombstone Run configs
The configuration below is roughly what was used. During the runs, note that at various points, time between deployment intervals, max_worker sizes, pool size(# of concurrent flows allowed), batch sizes and etc were changed.
Config when loading TINGs
Used ConcurrentTaskRunner with max_worker = 300
BATCH config in .env
TOMBSTONE_BATCHES=20
TOMBSTONE_BATCH_SIZE=25
worker pool set to allow 18 concurrent jobs/flows
Config when loading all other corps
Used ConcurrentTaskRunner with max_worker = 100 & 300
BATCH config in .env
TOMBSTONE_BATCHES=20
TOMBSTONE_BATCH_SIZE=25
worker pool set to allow 10-12 concurrent jobs/flows
Findings
The preliminary run is almost 2x faster which is somewhat expected due to the target db being in GCP. There are optimizations that I think can make that difference smaller.
There were failures and pending corp processing records that were a result of concurrency issues likely. Can delete these records and re-run it seems
There were failures in the corp processing table indicating that there is a duplicate in the target db. After some analysis, there were a few businesses that were probably concurrency related. In these cases, the businesses can be deleted from target db and reloaded just in case. But the bulk of the failed migration is due to the business really already existing in the LEAR target db before the migration happened. This is because the extract currently does not filter out new businesses that were originally created in LEAR and synced over to the COLIN db via the update colin filings job. There are also businesses that altered to BEN. We will address these in Tombstone pipeline - update extract script to exclude corps created in LEAR #26424 and Tombstone pipeline/investigate - Alteration from/to BEN Scenarios #26017.
The corps loaded in second half start decreasing in load times as less filings. As the second hafl was running overnight, there was a window where throughput was not maximized as there weren’t enough parallel flows running. There may be a more optimal batch config that can work well across different corps.
The target GCP db was actually able to handle the load quite well and most of the time wasn’t taxed much after reviewing the cloud sql performance metrics. Potentially can tweak the pipeline to put more load on the target db.
Load on GCP was mostly light except for when really hit it with a lot of workers during TINGs processing
ConcurrentTaskRunner configured with too many workers will result in connection issues with GCP target db if too many flows are running
Activity
[-]Tombstone dry run with target DB in GCP[/-][+]Tombstone dry run with target DB in GCP (1st run)[/+]argush3 commentedon Mar 10, 2025
FYI @vysakh-menon-aot @chenhongjing @leodube-aot @vishnup0422
Summary
A dry run of the production dataset was done with a setup similar to what the final migration looks like. The run took just over 24 hours and successfully migrated 634911 corps. Note that this run excluded TEDs as there were issues with these in the preliminary run and I just excluded them until some further investigation takes place.
In general, I think we can increase the throughput more with some tweaks but this first run gives us an initial baseline.
Tombstone pipeline setup
Specific Tombstone Run configs
The configuration below is roughly what was used. During the runs, note that at various points, time between deployment intervals, max_worker sizes, pool size(# of concurrent flows allowed), batch sizes and etc were changed.
Config when loading TINGs
Config when loading all other corps
Findings