An error occurred while fetching this tab.
insights: Re-use series points in oob settings migration
There are no commits yet
Push commits to the source branch or add previously merged commits to review them.
Created by: CristinaBirkel
Closes https://github.com/sourcegraph/sourcegraph/issues/28505
This PR takes another pass at the logic to re-use series and series points in the oob migration. There are considerations:
series_points.series_id
so that those series points can get used by this new series (with its new id.) backfill_queued_at
also needs to be stamped so that they don't get re-processed.I decided not to touch the insight_query_runner_jobs
because I don't think there's much of a need here. The only edge-case would be if a series is currently processing when we run the oob migration. And the result would be that the insight won't display as "still processing," even while it finishes processing. I don't think this will have a big impact on users and worst case it will be a one-time fluke, but let me know if you disagree.
I tested this by:
TRUNCATE insight_view CASCADE;
TRUNCATE insight_series CASCADE;
TRUNCATE dashboard CASCADE;
TRUNCATE series_points CASCADE;
series_id
formatTRUNCATE insight_view CASCADE;
TRUNCATE insight_series CASCADE;
TRUNCATE dashboard CASCADE;
insight_series
were re-used when they matchedseries_points
had their ids swapped with the new onesbackfill_queued_at
was stamped for the BE seriesI think this was a pretty good test and the next step will be to see how it does on k8s
.
Push commits to the source branch or add previously merged commits to review them.