xxntti3n commented on PR #77453:
URL: https://github.com/apache/airflow/pull/77453#issuecomment-7081587132

   Yeah, it does change the meaning of the column: it's the last heartbeat we 
persisted, not the last one received.
   
   I grepped for consumers before making the change. The scheduler zombie scan 
is the only thing that acts on it
   (scheduler_job_runner.py:4154), and that already compares against a 300s 
timeout on a 10s loop. The write interval
   is capped at half the timeout, so with defaults the stored value is at most 
~35s behind (30s cap + 5s heartbeat),
   which is far from 300s. A live task can't get failed because of this.
   
   Nothing else reads it: it's not in the public API models, the dashboard 
"Last Heartbeat" is Job.latest_heartbeat,
   and TaskInstance.update_heartbeat() has no callers. The only other write is 
the old Airflow 2 path
   (scheduler_job_runner.py:3961).
   
   The lag is mentioned in the config docs, and heartbeat_write_interval=0 
turns it off. One caveat: the cap uses the
   API server's task_instance_heartbeat_timeout, so that has to match the 
scheduler's config.
   
   Btw, dropping ti_heartbeat is what actually fixes the index bloat - without 
it those updates can be HOT. The write
   interval only cuts the remaining churn. I can split this into two PRs if 
it's easier to review that way.
   
   ---
   Drafted-by: AI coding assistant; reviewed by @xxntti3n 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]

Reply via email to