Task Instance and Retry

A task instance represents a task in a particular DAG Run; mapped tasks also have a map index. Its state records execution progress, while attempts describe retries or re-execution of that instance.

For an ordinary failing task with retries=2, the retry allowance permits an initial attempt and up to two more attempts. Delay and timeout settings control parts of this process, not whether an external effect already happened. A failure after a database commit can leave committed data behind.

Retry with stable identity and a destination rule that handles repeated effects. Reusing an interval key for a fixed replacement is one example; changed input versions and overlapping writers need further protection. Clearing instances for re-execution is an explicit operation whose upstream and downstream scope should be checked.

See Apache Airflow Fundamentals: DAGs, Tasks, and Scheduling for worked examples.

Further reading


Discover more from Insightful Data Lab

Subscribe to get the latest posts sent to your email.

Similar Posts

Questions, corrections, or additional insights?

This site uses Akismet to reduce spam. Learn how your comment data is processed.