Skip to content

Migration number 25 causes CPU spike and lock contention on splits tables during metastore startup #6204

@minhyuk-playground

Description

@minhyuk-playground

Summary

Migration number 25 (add-split-size), introduced in #6035, adds a GENERATED ALWAYS AS ... STORED column to the splits table.

In our environment (~1.5M rows in splits table), we observed:

  • CPU spike on the PostgreSQL instance
  • Lock-related metrics spike
  • Connection acquisition timeouts

Adding a GENERATED ALWAYS AS ... STORED column requires an exclusive lock to compute and store values for all existing rows, causing incoming queries to queue up.

Environment

  • PostgreSQL metastore with ~1.5M rows in splits table
  • Upgrading to a version containing migration number 25 (add-split-size)

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