Pipeline Reliability

Retries, checkpoints, atomic publish, partial failure and rollback — plus the SLOs that make freshness a commitment instead of a hope.

Pipeline Reliability

Reliability is not a low failure rate. It is seven mechanisms — retries, idempotency, checkpoints, atomic publish, validation, rollback, reprocessing — that are only safe as a set.

Q · The nightly pipeline ran 340 times last month and failed twice. Is it reliable?
Atomic Publish

A consumer must never read a half-written dataset. Build somewhere they are not looking, validate it there, then make it visible in one operation — and know which of the available operations is genuinely one.

Q · A query runs at 02:14 while the nightly load is halfway through rewriting `fct_orders`. What does it see, and what should it have seen?
Checkpointing

A restarted job has to resume from somewhere. A checkpoint is correct only if it records the input position and the computed state together, in one atomic action — otherwise it is a dual write wearing a reliability hat.

Q · A stateful streaming job is killed mid-window and restarted. Where does it resume, and what has to have been saved for the answer to be correct?
Partial Failure

Ninety-eight partitions succeeded and two failed. Re-running only the two is right — but only if the unit is idempotent and independently publishable, and most people check neither before doing it.

Q · A run processes a hundred partitions and two of them fail. What is the correct next action, and what has to be true for it to be safe?
Retries in Pipelines

Retrying a task that already published is not a retry — it is a second publish. Retry is safe exactly when the task is idempotent, and a uniform retry policy applied to tasks that are not uniformly idempotent is the honest failure here.

Q · A task times out after its write committed. The orchestrator retries it. What just happened to the data?
Pipeline SLOs
▶ lab

A published, measured promise about a dataset — when it arrives, how fresh it is, how often it is right — agreed with the people who depend on it rather than declared by the team that runs it.

Q · What exactly are we promising the people who read this table, and how would either of us know the promise was broken?
The Freshness SLO
▶ lab

Now minus the event time of the newest **complete** data. The word "complete" does all the work: a table holding a few hours of today is extremely fresh and completely wrong to aggregate.

Q · A consumer asks how fresh this table is. What number do you give them, and what has to be true for that number to mean anything?
Rolling Back Data
▶ lab

Reverting the transformation code does not revert the tables it wrote. A data rollback is either a restore from a retained snapshot or a re-run of the previous logic over the affected range — and both of them are forward operations.

Q · A bad model shipped four hours ago and has been overwriting a fact table ever since. What does "roll it back" actually mean, and what is still wrong after you have done it?