The GitHub Actions job "Tests (AMD)" on 
airflow.git/fix/asset-event-lock-contention has failed.
Run started by GitHub user hkc-8010 (triggered by hkc-8010).

Head commit for run:
e2b51a89f8e76ab7c3686e9c280c79a418373fed / Hemkumar Chheda 
<[email protected]>
Register task-success asset events asynchronously to avoid API-server lock 
contention

On task success, ti_update_state committed the TI state and then registered 
asset
events while still holding the task_instance row lock. Under high fan-out (many 
tasks
emitting assets at once) this held the lock across the long registration work, 
piling
up requests and OOMKilling the API server.

Record the asset events as a durable marker in a new asset_event_queue table, 
committed
in the same transaction as the TI state, and let the scheduler drain that queue 
and run
the registration. The task-completion request no longer registers assets 
itself, so the
row lock is held only for the state write plus one insert. The drain resolves 
the task
instance by natural key (dag_id, run_id, task_id, map_index) rather than its 
surrogate
id, so clearing a task (which reassigns the id) does not drop pending events on 
any
backend. A registration that keeps failing is retried up to
[scheduler] asset_event_queue_max_attempts times, then parked and surfaced via 
the
asset.event_queue.failures metric.

dag.test runs in process without a scheduler, so it drains its own queued 
events after
each task finishes, keeping asset events visible during a test run. Also 
replace the
alias-event ORM append with a direct association insert to avoid an O(n) 
lazy-load on
long-lived aliases.

closes: #66853

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

Report URL: https://github.com/apache/airflow/actions/runs/29934665636

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to