Skip to content

Migration 0108 runs slow with large data in TI and Dag_run table #63866

@vatsrahul1001

Description

@vatsrahul1001

Apache Airflow version

main (development)

If "Other Airflow 3 version" selected, which one?

No response

What happened?

Migration 0108_3_2_0_fix_migration_file_ORM_inconsistencies taking a lot of time to complete when we have alot data in TI and dag_run table.

I was testing this with 10M data in TI and dag_run table and migration taking more than an hour

What you think should happen instead?

No response

How to reproduce

  1. Start Airflow on 3.1.8 with PostgreSQL
  2. Have 1M+ task instances and dag runs
  3. Upgrade to 3.2.0 (airflow db migrate)
  4. Observe migration 0108 running for hour

Operating System

Mac

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions