Skip to content

Update queries to include partition_id filter for ci_builds and ci_builds_metadata tables

We can't change CommitStatus.table_name = :ci_builds to CommitStatus.table_name = :p_ci_builds because of the queries that will be routed though the partitioned table will time out. We did an experiment on production canary and found three examples of such queries: !129812 (comment 1522672166)

There could be more on sidekiq, but there's no easy way to identify them.