Skip to content

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.

  1. Create a new table with project_id and build_id (Int8) columns
  2. Create row in that table whenever a build transitions to pending state
  3. Remove row from that table whenever a build transitions from pending state to a different one
  4. 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)

  1. Select builds from that table, join with ci_builds table
  2. Backfill this table during a post deployment migration
  3. Enable this mechanism on production using feature flag toggle.

Confidence: 99%

Edited by Grzegorz Bizon