Failures and recovery
When an external operation fails, an application must decide what is known, which operations have completed, and whether recovery can be attempted safely.
Recovery is not always rollback
Section titled “Recovery is not always rollback”A payment capture, an email, or a message sent to a third-party system cannot necessarily be undone. A compensating operation may instead perform a new action (for example, issuing a refund) whose result must be verified separately.
Compensation can also fail. In that case, a trustworthy execution system must not misreport the workflow as successfully restored.
Important failure scenarios
Section titled “Important failure scenarios”- A step fails before producing any external side effect.
- A step succeeds, but the application loses its acknowledgement.
- A later step fails after earlier operations completed.
- A compensation attempt fails or only partially succeeds.
- The application restarts while recovery is in progress.
Handling these scenarios may require application-specific idempotency keys, durable state, external reconciliation, or manual intervention. No library can make those needs disappear.
See also: Guarantees and limitations.