amoghrajesh commented on code in PR #68438:
URL: https://github.com/apache/airflow/pull/68438#discussion_r3407838771
##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -86,7 +86,7 @@
TaskInletAssetReference,
TaskOutletAssetReference,
)
-from airflow.models.asset_store import AssetStoreModel
+from airflow.models.asset_state_store import AssetStateStoreModel
Review Comment:
This is the orphaned-row sweep that runs alongside
`_orphan_unreferenced_assets` — it issues a single bulk `DELETE` keyed on
`asset_id NOT IN (active assets)`. The store backend API is scoped to
individual key get/set/delete operations and doesn't expose a bulk "delete all
rows for these asset IDs" operation, so we'd need to either add a method to the
backend for this specific use case or keep the direct model access here. Given
it's a scheduler-internal maintenance operation (not user-facing task
execution), the direct model access feels reasonable. Happy to add a
`delete_orphaned_asset_state` method to the backend if you'd prefer.
---
Drafted-by: Claude Sonnet 4.6 (no human review before posting)
--
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]