You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/09/08 02:33:36 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #26205: Fix Deferrable Operators get stuck as "scheduled" during backfill

uranusjr commented on code in PR #26205:
URL: https://github.com/apache/airflow/pull/26205#discussion_r965447895


##########
airflow/jobs/backfill_job.py:
##########
@@ -218,6 +218,16 @@ def _update_counters(self, ti_status, session=None):
                 ti_status.running.pop(reduced_key)
                 ti_status.to_run[ti.key] = ti
 
+            elif ti.state == TaskInstanceState.SCHEDULED:
+                # Deferrable task can go from DEFERRED to SCHEDULED,
+                # when that happens, we need to remove it from running
+                # and add it to to_run
+                ti_status.running.pop(ti.key)
+                ti_status.to_run[ti.key] = ti
+
+            elif ti.state == TaskInstanceState.DEFERRED:
+                self.log.warning("The triggerer is not running. Please start the triggerer")

Review Comment:
   Do we need to do some additional checks to ensure the triggerer is really not running? I’d imagine this could cause some data race issues where the triggerer _is_ running but just has some delays and does not pick up the task instance in time.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org