uranusjr commented on code in PR #68517:
URL: https://github.com/apache/airflow/pull/68517#discussion_r4204125760
##########
airflow-core/src/airflow/assets/manager.py:
##########
@@ -749,7 +757,7 @@ def _get_or_create_apdr(
.order_by(AssetPartitionDagRun.id.desc())
.limit(1)
)
- if latest_apdr and latest_apdr.created_dag_run_id is None:
+ if latest_apdr and latest_apdr.created_dag_run_id is None and
allow_reuse:
Review Comment:
When `allow_reuse=False`, we’d still run the latest_apdr select under the
lock, and then ignore the result. Skip the query instead of adding the check
here.
--
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]