Orchestration, CI and Backfills · Lesson 2 of 5 · 16 min
Retries and idempotent tasks
Tasks fail. Retry them automatically, and make sure running a task twice does no harm.
Networks drop, APIs time out, warehouses get busy. Most failures go away if you simply try again a minute later, so every orchestrator has retries.
Retries are only safe if the task is idempotent: running it twice gives the same result as running it once. A task that appends rows is not idempotent; a rerun duplicates them. A task that replaces the data for its run_date (delete that day, then insert it again, or a MERGE on a key) is.