yuseok89 commented on code in PR #70092:
URL: https://github.com/apache/airflow/pull/70092#discussion_r3623430672
##########
airflow-core/src/airflow/models/taskinstance.py:
##########
@@ -1268,7 +1268,8 @@ def next_retry_datetime(self):
delay = timedelta(seconds=delay_backoff_in_seconds)
if self.task.max_retry_delay:
delay = min(self.task.max_retry_delay, delay)
- return self.end_date + delay
+ base = self.end_date if self.end_date is not None else
timezone.utcnow()
Review Comment:
Direction sounds right.
Tiny thing, feel free to ignore. Since `is_premature` calls
next_retry_datetime(), would mutating there mean a plain read touches the DB?
If so, `set_state()` already anchors this case. Either way works.
https://github.com/apache/airflow/blob/723b06b38a95608bb082494b973d48d25e7a6808/airflow-core/src/airflow/models/taskinstance.py#L1020
--
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]