ashb commented on a change in pull request #3994: [AIRFLOW-3136] Add
retry_number to TaskInstance Key property to avoid race condition
URL: https://github.com/apache/incubator-airflow/pull/3994#discussion_r222231277
##########
File path: airflow/models.py
##########
@@ -1230,7 +1230,7 @@ def key(self):
"""
Returns a tuple that identifies the task instance uniquely
"""
- return self.dag_id, self.task_id, self.execution_date
+ return self.dag_id, self.task_id, self.execution_date, self.try_number
Review comment:
Right now the PK columns of the TI table is (self.dag_id, self.task_id,
self.execution_date) and try_number is adjusted in place.
This change might be a good idea but I think it is more complex than just
this -- for instance it probably makes sense to store each individual try in
the task instance table, but that is a much bigger change.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services