RNHTTR commented on PR #39770:
URL: https://github.com/apache/airflow/pull/39770#issuecomment-2136195847

   > I think better approach is to extract internal method and use 
`@retry_db_transaction` decorator.
   
   Good call -- Each of the DB calls in this method already use this decorator. 
I took a closer look at the traceback, and the exception is actually raised 
within the `heartbeat_callback` 
[here](https://github.com/apache/airflow/blob/main/airflow/jobs/job.py#L229), 
which eventually calls 
[TaskInstance.get_task_instance](https://github.com/apache/airflow/blob/main/airflow/models/taskinstance.py#L842),
 which [appears to retry for `ConnectionError` and `NewConnectionError`, but 
not 
`OperationalError`](https://github.com/apache/airflow/blob/main/airflow/api_internal/internal_api_call.py#L88).
 Do you think it makes sense for me to add OperationalError as a retryable 
exception?


-- 
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