Complete failure is easy: nothing happened, run it again. Partial failure leaves some work done, some not, and frequently no record of which is which.
Why is it harder?
Because the state is unknown. Fifty items processed out of two hundred, with no marker, means somebody has to work out where it stopped before anything can be rerun safely.
What makes it tractable?
- Recording progress. Per item, as you go.
- Idempotent operations. Safe to repeat.
- Clear reporting. What succeeded and what did not.
- A resume path. Rather than starting over.
Why record per item?
Because the alternative is guesswork. Marking each item done as it completes means a rerun skips what is finished, which turns recovery into rerunning the same job.
What about actions across systems?
The genuinely difficult case. An item updated in one system and not the other leaves an inconsistency that no rerun fixes, and detecting it requires comparing the two.
What is a compensating action?
Undoing what was done when a later step fails. That is how systems handle multi-step operations that cannot be atomic, and it has to be designed rather than assumed.
What about telling people the run was incomplete?
Essential and frequently omitted. Somebody relying on the output needs to know it covers eighty per cent of what it usually does, because they will otherwise act on it as though it were complete.
That notification matters more than the alert to the owner. The owner will fix it; the person using the output is the one who would otherwise make a decision on partial information.
When is that worth building?
When inconsistency matters. For a filing workflow, leave it and fix later; for anything touching records people rely on, the ability to unwind is worth the effort.
What should the report say?
Counts and specifics. Processed a hundred and twelve, failed eight, listed here, is actionable; completed with some errors is not.
Why do people miss this?
Because testing happens on small clean batches where everything succeeds. Partial failure appears at volume with real data, which is after deployment.
What about items that fail repeatedly?
Worth separating from ordinary failures. The same item failing every run is a different problem from a transient error, and it will otherwise generate an alert indefinitely.
Marking it after a few attempts and removing it from the queue is the usual answer. It also focuses attention correctly, since a permanently failing item needs somebody to look at it rather than another automated retry.
What about long-running batches?
Where partial failure is most likely and most costly. A job processing thousands of items over hours will encounter something unexpected, and restarting from the beginning wastes everything done so far.
Designing for resumption from the start is considerably easier than retrofitting it. Recording progress as you go costs almost nothing at build time and saves an afternoon the first time a long run fails at eighty per cent.
How do you test for it?
By causing it deliberately. Stopping a run halfway, or feeding in an item you know will fail, exercises the recovery path while nothing depends on it.
An alert on errors, an alert on zero results, a heartbeat, and all of them reaching somebody who would act covers most silent failure.
What is the minimum worth building?
Progress recorded per item and a report naming what failed. Those two turn an incident into a rerun, which is the difference between an hour and an afternoon.