Skip to content

Speed up Migration 0136 on MySQL - #74409

Merged
ashb merged 1 commit into
mainfrom
xcom-mapped-length-check-not-valid
Oct 8, 2026
Merged

ashb merged 1 commit into
mainfrom
xcom-mapped-length-check-not-valid

Conversation

@ashb

@ashb ashb commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

It turns out that adding a CHECK constraint on mysql copies the entire
table
. Large values and all.

Enforcing this check is simply not worth a possibly 4 hour migration!

Doubly so now that 0142 has landed, and nothing live will write any new row to this table.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborg boring-cyborg Bot added the area:db-migrations PRs with DB migration label Oct 7, 2026
Comment thread airflow-core/src/airflow/models/xcom.py Outdated

@kaxil kaxil left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The inline comments are optional; happy either way on dropping the CHECK entirely.

@ashb
ashb force-pushed the xcom-mapped-length-check-not-valid branch from 56a8bee to ce7ee77 Compare October 7, 2026 21:14
When migration 0136 was written and merged, xcom was still being written to,
but now that 0142 has landed this table is read-only.

So it makes no sense to spend any time writing this migration.

(It turns out that adding a CHECK constraint on mysql _copies the entire
table_. Large values and all.)
@ashb
ashb force-pushed the xcom-mapped-length-check-not-valid branch from ce7ee77 to 875f7b6 Compare October 8, 2026 08:40
@ashb
ashb merged commit bf3d402 into main Oct 8, 2026
78 of 79 checks passed
@ashb
ashb deleted the xcom-mapped-length-check-not-valid branch October 8, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:db-migrations PRs with DB migration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants