dirrao commented on code in PR #38984:
URL: https://github.com/apache/airflow/pull/38984#discussion_r1564417518
##########
airflow/models/taskinstance.py:
##########
@@ -274,6 +274,12 @@ def clear_task_instances(
ti.state = TaskInstanceState.RESTARTING
job_ids.append(ti.job_id)
else:
+ # When the task is deferred the try_number is decremented so that
the same try
+ # number is used when the task resumes execution to process the
event. But in case of
+ # clearing the try number should be incremented so that the next
run doesn't reuse the same try_number
+ if ti.state == TaskInstanceState.DEFERRED:
Review Comment:
I believe clear action is meant to quickly restart things. However, here we
are increasing the try_number nothing else.
--
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]