ashb commented on a change in pull request #10956:
URL: https://github.com/apache/airflow/pull/10956#discussion_r494942639
##########
File path: airflow/models/dagrun.py
##########
@@ -494,12 +542,13 @@ def verify_integrity(self, session: Session = None):
session.add(ti)
try:
- session.commit()
+ session.flush()
except IntegrityError as err:
self.log.info(str(err))
self.log.info('Hit IntegrityError while creating the TIs for '
f'{dag.dag_id} - {self.execution_date}.')
self.log.info('Doing session rollback.')
+ # TODO[HA]: We probaly need to savepoint this so we can keep the
transaction alive.
Review comment:
Already had that thought too :)
https://github.com/apache/airflow/blob/b28d67332bb052441bc2ffd00030d620aac381c8/airflow/jobs/scheduler_job.py#L1565-L1566
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]