Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add checks to identify costly database migrations #20763

@bpmct

Description

@bpmct

Problem Statement

The upgrade of Coder v2.26 to v2.27 included 15 migrations, including several costly ones on the API keys table that led to migration times that took up to an hour.

The Coder R&D team was largely unaware of the impact of this migration, meaning that customers were also in the dark about the larger-than-normal migration time

Note

For full context, check out our most recent R&D reto

Investigation Spike Needed

  • How can we, with relatively low effort, identify culprits for intense database migrations?
  • When an intense migration is present, how can we BOTH
    • Notify the developer so that some cycles can be spend on optimization
    • Notify the release manager that, even when optimized, some migrations may still take 20-30m so customers are prepared in the changelog

Ideas

  • When a release branch is cut, automatically run a migration against a backup and time it
  • @spikecurtis had some others :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions