uranusjr commented on PR #34771:
URL: https://github.com/apache/airflow/pull/34771#issuecomment-1903591587

   > * after this PR, `ti.start_date` will be set during the `QUEUED` phase in 
most cases
   > 
   > * the time duration between `QUEUED` and `RUNNING` may be long in some 
cases, such as all workers are busy
   
   I also have the same impression reading the changes again directly. I wonder 
why `emit_state_change_metric` would check for `start_date` when the task 
instance is changed to QUEUED. That seems unintuitive for the same reason. The 
warning message read:
   
   > cannot record %s for task %s because **previous state change time** has 
not been saved
   
   (I added the emphasis)
   
    `start_date` is set when the task starts running, but when you change the 
state to QUEUED, the task has not started running. Why does `start_date` being 
unset indicates a previous state change? The entire situation seems more 
awkward than I initially anticipated.
   
   The warning was added in #30612 by @vandonr-amz so it may be best to get 
some context from the source.


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