ashb commented on code in PR #69336:
URL: https://github.com/apache/airflow/pull/69336#discussion_r3777251148


##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -1516,7 +1516,17 @@ def process_executor_events(
                 )
             )
 
-            if ti_queued and not ti_requeued:
+            # A running task that's still sending heartbeats is alive -- a 
worker is running it right now.
+            # This event is probably from a duplicate that already lost and 
died, so don't fail the live
+            # run. If the task really did die, heartbeat detection will fail 
it once the heartbeat stops.
+            heartbeat_timeout = conf.getint("scheduler", 
"task_instance_heartbeat_timeout")
+            ti_alive = (
+                ti.state == TaskInstanceState.RUNNING

Review Comment:
   This change looks like a no-op to me, on L1450 we have
   
   ```
   if state in (TaskInstanceState.QUEUED, TaskInstanceState.RUNNING):
       ....
       continue
   ```
   
   which means ti_alive will never be true as the first part of the condition 
is going to be False.



-- 
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]

Reply via email to