Create a separate table for pending builds
Description
As a first step in the ci_pending_builds
story, we need to create a new, small table with that name.
- Create a new table with
project_id
andbuild_id
(Int8) columns - Create row in that table whenever a build transitions to
pending
state - Remove row from that table whenever a build transitions from
pending
state to a different one - Enable this change incrementally in the production environment to see the impact it might have on the transactions duration.
Descoped items, moved to the next iteration: #331417 (closed)
- Select builds from that table, join with
ci_builds
table - Backfill this table during a post deployment migration
- Enable this mechanism on production using feature flag toggle.
Confidence: 99%
Edited by Grzegorz Bizon