Partial failure is a condition in which some parts of an operation fail while other parts succeed, so the overall result is neither a clean success nor a clean failure. In the Reliability area of Automation, it describes workflows, batch jobs and distributed calls that stop halfway, leaving completed side effects behind and others never applied.
Partial failure is the defining problem of distributed systems. A single process either runs or crashes, but a workflow spanning databases, message brokers and external APIs can lose one participant while the rest continue. Because a caller often cannot tell whether a remote step happened, handling partial failure correctly requires deliberate design rather than a simple error handler.
Why partial failure happens in automated workflows
Partial failure happens because independent components fail independently. Each service, network link, database and worker has its own failure modes, and no shared clock or global transaction guarantees that all of them change state together. A workflow with five steps has five places to break, plus every network hop between them.
The hardest case is the ambiguous outcome. When a request times out, the caller does not know whether the remote side never received it, processed it and failed to reply, or is still working on it. This uncertainty, sometimes summarized by the Two Generals problem, means that no protocol can make every participant certain of the outcome over an unreliable network.
The table below lists the most common sources of partial failure and how they appear in practice.
| Source | What happens | Visible symptom |
|---|---|---|
| Network timeout | Response lost after the remote side acted | Unknown outcome, risk of duplicates |
| Worker crash mid-step | Process dies between two side effects | Half-written records or files |
| Downstream outage | One dependency rejects or ignores calls | Some items processed, others stuck |
| Batch item errors | Individual records fail validation | Job reports success with gaps |
| Dual writes | Database commit succeeds, message publish fails | State and events disagree |
| Resource exhaustion | Rate limits or quotas hit partway | Throttled tail of a large run |
Forms and scopes of partial failure
Partial failure appears at several scopes, from one API call to an entire platform, and the right response depends on the scope. Engineers distinguish them because a fix suited to one level is often wrong at another.
| Scope | Example | Main consequence |
|---|---|---|
| Single request | Payment API charges card but times out | Ambiguous outcome for the caller |
| Multi-step workflow | Order created, inventory not reserved | Inconsistent business state |
| Batch or bulk job | 9,950 of 10,000 records imported | Silent data gaps |
| Fan-out operation | Notification sent to two of three channels | Uneven user experience |
| System degradation | Search down, checkout still working | Reduced but usable service |
Not every partial failure is harmful. Graceful degradation deliberately accepts a partial failure, such as hiding recommendations when that service is down, so that core functions stay available. The danger lies in unplanned and unnoticed partial failures, where a job reports success while part of its work was lost.
Patterns that contain partial failure
Reliable automation contains partial failure by making steps safe to repeat, safe to undo, or impossible to half-apply. No single technique covers every case, so mature systems combine several patterns from the reliability toolkit.
| Pattern | Core idea | Best suited to |
|---|---|---|
| Idempotency | Repeating a step produces the same result | Retries after ambiguous timeouts |
| Retry with backoff | Repeat failed steps with growing delays | Transient network and service errors |
| Saga pattern | Sequence of local steps with compensations | Long business transactions across services |
| Transactional outbox | Write state and outgoing event in one commit | Eliminating dual-write gaps |
| Checkpointing | Record progress so work resumes, not restarts | Long batch and data pipelines |
| Dead letter queue | Isolate items that keep failing | Poison messages in queues |
| Bulkhead pattern | Partition resources per dependency | Stopping one failure from spreading |
Idempotency is the foundation for almost all of these. A retry is only safe when a repeated call cannot charge a card twice or create a second order, which usually means attaching an idempotency key to each request and storing processed keys on the receiving side. Without it, every retry converts one partial failure into a possible duplicate.
When an action cannot be rolled back, a compensating action provides a semantic undo, such as issuing a refund instead of deleting a charge. Compensations are themselves steps that can fail, so they must also be idempotent and retried until they succeed. Platforms built on durable execution record each completed step, letting a workflow resume exactly where it stopped after a crash.
Partial failure versus related failure models
Partial failure is often confused with neighboring concepts. It differs from a total failure, in which the whole operation stops and nothing changes, and from a transient fault, which is a short-lived error that may or may not leave partial effects behind.
Distributed systems theory also distinguishes crash failures, where a node simply stops, from Byzantine failures, where a node behaves arbitrarily or maliciously. Most business automation assumes the crash-recovery model: components may stop and restart, messages may be lost, delayed or duplicated, but nobody lies. Partial failure analysis in workflows almost always works within that model.
Finally, a distributed two-phase commit can prevent some partial failures by making all participants commit or abort together. In practice it is rarely used across services because it blocks on a failed coordinator, reduces availability and is unsupported by most external APIs, which is why sagas and outboxes dominate modern automation.
Detecting and diagnosing partial failure
Partial failures are dangerous mainly because they are easy to miss. A job that exits with status zero after skipping 50 records looks healthy on a dashboard. Detection therefore relies on comparing expected and actual outcomes, not only on catching exceptions.
- Per-item result tracking in batch jobs, reporting counts of succeeded, failed and skipped records rather than a single status.
- Reconciliation jobs that periodically compare two systems, such as orders and payments, and flag mismatches.
- Correlation IDs carried through every step, so traces show exactly where a workflow stopped.
- Alerts on stuck states, for example orders that remain in a pending status longer than a set threshold.
- Explicit partial-success statuses in APIs and workflow engines instead of forcing every result into success or error.
A common mistake is wrapping a multi-step script in one broad try-catch block and retrying the whole script from the beginning. That approach repeats steps that already succeeded and can create duplicates. The better practice is to retry at the level of each step and to record which steps have completed.
Understanding it simply
A partial failure is like a moving day where the truck delivers the furniture but the boxes never arrive. Something happened, but not everything. The new home is half set up and the old one is half empty.
Automated systems face the same problem. A task may update one system and then stop before updating the next. The key takeaway is that good automation must be able to finish the job or cleanly undo it, and it must notice when it stopped halfway.
Applied in practice
An online retailer runs an automated order workflow with four steps: reserve inventory, charge the card, create a shipping label and send a confirmation email. One evening the payment provider responds slowly, and about 2 percent of charge requests time out after the provider had already captured the payment. The original workflow treated each timeout as a failure and released the inventory, leaving customers charged for orders that never shipped.
The engineering team redesigns the flow as a saga with idempotency keys. Each charge request now carries the order number as its key, so a retry returns the existing result instead of charging again. If shipping-label creation fails permanently, a compensating refund runs automatically. A nightly reconciliation job compares captured payments with shipped orders. After the change, charged-but-unshipped orders drop to zero, and the few remaining exceptions land in a review queue within minutes instead of surfacing days later as customer complaints.