Track pipelines_id_range on ci_partitions

What does this MR do and why?

Track pipelines_id_range on ci_partitions

Adds pipelines_id_range int8range column to ci_partitions with a GiST exclusion constraint that prevents overlapping ranges. The new column is populated by Ci::Partitions::SyncService when switching writes, capturing MIN/MAX(commit_id) from the outgoing partition and assigning an open-ended range to the incoming one. A post-deploy migration backfills existing partitions using MIN(commit_id) from p_ci_builds, clamped to the next partition's MIN(commit_id) to avoid GiST overlap.

Changelog: other

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.

Related to #593701 (closed)

Merge request reports

Loading