Skip to content

Migration for updating int to bigint takes long time for large Concourse deployments #8499

Closed

Description

@xtremerui

Summary

Last deployment for hush-house tooks about 30mins for the migration,

table rows
builds 11727519
successful_build_outputs 7303798

We will need to do sth similar to build events table where build ID is migrated from int to bigint

Or, do we really need to convert rerun_of in #8390 ?

Activity

  1. added this to the v7.9.0 milestone on Jul 26, 2022
  2. removed this from the v7.9.0 milestone on Nov 16, 2022
  3. taylorsilva commented on Dec 23, 2024

    @taylorsilva
    Member

    See #8626

    We need to add a migration that alters the build.rerun_of column. The builds table is usually massive, so this causes the migration time to really blow up. Ideally operators should shut all web nodes down and do the migration while nothing else is interacting with the database.

    This problem is tricky. We couldn't find a performant way to make the migration happen. Basically:

    1. We made a fancy component that would slowly migrate stuff from the builds table Migrate build_id references to bigint #6203
    2. We found that this was still very slow and sucked. We backed that out and instead made two columns, one with the old id's and a second for the new id's. In our code we then check both columns. Sad times. Apply bigint migrations to build_events partitions and read from old/new columns instead #6305
      • The above two points landed in v7.0.0
    3. In 7.9.0 we tried fixing a similar int->bigint issue in this PR Fix DB integer out of range error #8390

    So we're basically still stuck with the issue reported in #9029

    Do we bite the bullet and just try altering the column? Or do we do another old/new column thing again?

  4. added this to the v8.0.0 milestone on Dec 23, 2024
  5. moved this from Icebox to Backlog in Concourse Roadmapon Nov 26, 2025
  6. moved this from Backlog to Icebox in Concourse Roadmapon Dec 2, 2025
  7. moved this from Icebox to Backlog in Concourse Roadmapon Dec 16, 2025
  8. taylorsilva commented on Dec 16, 2025

    @taylorsilva
    Member

    I'm going to go with the old/new column thing again. It's annoying since we're stuck with the tech debt, but it's hard to ship a proper migration like #6203 tried to in an OSS project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions