kaxil commented on code in PR #76834:
URL: https://github.com/apache/airflow/pull/76834#discussion_r4552230950
##########
airflow-core/src/airflow/models/trigger.py:
##########
@@ -343,11 +343,12 @@ def clean_unused(cls, *, session: Session = NEW_SESSION)
-> None:
if batch_size <= 0:
raise ValueError("[triggerer]
unreferenced_triggers_cleanup_batch_size must be at least 1")
- # Update all task instances with trigger IDs that are not DEFERRED to
remove them
+ # Update all task instances with trigger IDs that are not DEFERRED to
remove them.
+ # A NULL state (a cleared task instance) never satisfies ``!=`` in
SQL, so match it explicitly.
Review Comment:
Does a normal Clear on main still leave a NULL-state TI holding a
`trigger_id`? `clear_task_instances` goes through `prepare_db_for_next_try`,
which archives the row and nulls `trigger_id` on the successor, so I only see
this from rows written by 3.3.x and earlier. Could the comment say that, so
nobody reads it as a current path?
--
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]