FrankYang0529 commented on PR #69944: URL: https://github.com/apache/airflow/pull/69944#issuecomment-4998232116
@viiccwen Thanks for the review. You're right. The listener hooks and the `asset.updates` metric run before `_queue_dagruns()` are not transactional and would run again on a replay. Another path (task success → Execution API `ti_update_state` → `register_asset_changes_in_db`) retries when response is 5xx. https://github.com/apache/airflow/blob/6ba529e0ebf0bd829bed78201a89b3a59ec809df/task-sdk/src/airflow/sdk/api/client.py#L1208-L1215 However, the deadlock error doesn't return 5xx. It only marks task as failed. https://github.com/apache/airflow/blob/6ba529e0ebf0bd829bed78201a89b3a59ec809df/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py#L467-L478 I agree that we should remove `@retry_db_transaction` change to align the behavior. Since issue author already created another PR https://github.com/apache/airflow/pull/69977, I will close this one. -- 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]
