fenglu-g commented on a change in pull request #4769: [AIRFLOW-2511] Fix
improper failed session commit handling
URL: https://github.com/apache/airflow/pull/4769#discussion_r259875213
##########
File path: airflow/jobs.py
##########
@@ -2168,147 +2168,149 @@ def _process_backfill_task_instances(self,
# or leaf to root, as otherwise tasks might be
# determined deadlocked while they are actually
# waiting for their upstream to finish
+ @provide_session
Review comment:
Good point.
Not necessarily so, it just means that each TI gets its own session, which
may or may not mapped to new connection as SQLAlchemy/Airflow does connection
pooling. In fact, we use ti.refresh_from_db() a lot, where a new session object
is created per call
(https://github.com/apache/airflow/blob/c50a85146373bafb0cbf86850f834d63bd4dede8/airflow/models/__init__.py#L932).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services