Skip to content

[v3-3-test] Reduce memory used when deleting queued asset events (#71917) - #71937

Merged
jason810496 merged 1 commit into
v3-3-testfrom
backport-49c5d51-v3-3-test
Aug 22, 2026
Merged

jason810496 merged 1 commit into
v3-3-testfrom
backport-49c5d51-v3-3-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

delete_asset_queued_events and delete_dag_asset_queued_event forced
SQLAlchemy's "fetch" synchronize_session strategy on their
AssetDagRunQueue deletes. That strategy reads the primary key of every
deleted row back from the database to update the ORM session's
identity map, but neither endpoint loads any AssetDagRunQueue objects
into the session beforehand, so the read-back keys are matched against
an empty map and discarded.

The sibling delete_dag_asset_queued_events endpoint already used the
default "auto" strategy; the other two now match it.
(cherry picked from commit 49c5d51)

Co-authored-by: Jyun-An Chen jun930436@gmail.com

)

delete_asset_queued_events and delete_dag_asset_queued_event forced
SQLAlchemy's "fetch" synchronize_session strategy on their
AssetDagRunQueue deletes. That strategy reads the primary key of every
deleted row back from the database to update the ORM session's
identity map, but neither endpoint loads any AssetDagRunQueue objects
into the session beforehand, so the read-back keys are matched against
an empty map and discarded.

The sibling delete_dag_asset_queued_events endpoint already used the
default "auto" strategy; the other two now match it.
(cherry picked from commit 49c5d51)

Co-authored-by: Jyun-An Chen <jun930436@gmail.com>
@jason810496 jason810496 added this to the Airflow 3.3.2 milestone Aug 22, 2026
@jason810496
jason810496 merged commit 67b6015 into v3-3-test Aug 22, 2026
132 of 133 checks passed
@jason810496
jason810496 deleted the backport-49c5d51-v3-3-test branch August 22, 2026 14:54
vatsrahul1001 pushed a commit that referenced this pull request Sep 7, 2026
) (#71937)

delete_asset_queued_events and delete_dag_asset_queued_event forced
SQLAlchemy's "fetch" synchronize_session strategy on their
AssetDagRunQueue deletes. That strategy reads the primary key of every
deleted row back from the database to update the ORM session's
identity map, but neither endpoint loads any AssetDagRunQueue objects
into the session beforehand, so the read-back keys are matched against
an empty map and discarded.

The sibling delete_dag_asset_queued_events endpoint already used the
default "auto" strategy; the other two now match it.
(cherry picked from commit 49c5d51)

Co-authored-by: Jyun-An Chen <jun930436@gmail.com>
@vatsrahul1001 vatsrahul1001 added the type:bug-fix Changelog: Bug Fixes label Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants