dingo4dev commented on code in PR #62501:
URL: https://github.com/apache/airflow/pull/62501#discussion_r3626995665
##########
airflow-core/src/airflow/assets/manager.py:
##########
@@ -518,18 +548,19 @@ def _queue_dagruns(
# mapped) tasks update the same asset, this can fail with a unique
# constraint violation.
#
- # Where the dialect supports a single-statement "insert, ignore on
+ # Where the dialect supports a single-statement "insert, update on
# conflict" we use it; it is atomic, avoids the per-row SAVEPOINT
churn,
# and holds locks for far less time (which on MySQL/InnoDB also makes
the
# concurrent fan-out much less deadlock-prone). Otherwise we
"fallback" to
# a nested transaction per row. Either way the rows are added in the
same
# transaction where `ti.state` is changed.
dialect_name = get_dialect_name(session)
- if dialect_name == "postgresql":
Review Comment:
@Lee-W Thank you for your review. I did not remove that improvement. I just
moved it into a shared path as both PostgreSQL and SQLite support `ON CONFLICT
DO UPDATE`, so this logic are replaced into
`_queue_dagruns_nonpartitioned_conflict_update`
--
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]