kacpermuda opened a new pull request, #77024:
URL: https://github.com/apache/airflow/pull/77024

   Asset listeners fired by a trigger (`on_asset_changed`, 
`on_asset_event_emitted`) ran inside the triggerer's transaction, before Dag 
runs were queued and before commit. The task path already commits first 
(`execution_api/routes/task_instances.py`); `Trigger.submit_event` now does the 
same.
   
   How this can take down the triggerer: the run loop does not catch errors 
from `handle_events`, so a failed commit stops the process. Say a listener 
blocks longer than Postgres `idle_in_transaction_session_timeout` (e.g. an 
OpenLineage HTTP transport with a long timeout and a backend that is down). 
Postgres closes the connection, the commit raises, and the triggerer exits. 
With a shared-stream watcher the broker redelivers the event, the listener 
blocks again, and the triggerer crash-loops, so none of its triggers make 
progress. Even without a crash, listeners have already reported an asset event 
that was rolled back.
   
   related: #76750
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5.5)
   
   Generated-by: Claude Code (Opus 5.5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to