concept

Pivot Transaction

The step in a saga after which the transaction can no longer be cancelled — everything before it is compensatable, everything after it is retriable until it succeeds.

sagaorderingdesign

A useful classification for saga steps. Compensatable steps can be undone. The pivot is the point of commitment. Retriable steps come after the pivot and must eventually succeed, because there is no way back.

Charging the card is often the pivot: before it, the order can be cancelled cleanly; after it, the customer has paid and the remaining steps — allocate stock, notify the warehouse, send confirmation — must be driven to completion, retried indefinitely if necessary, and escalated to a human if they cannot succeed.

Two design rules follow directly. Order the steps so the pivot is as late as possible, which maximises the window in which clean cancellation is available. And make everything after the pivot genuinely retriable — idempotent, with no dependency that can fail permanently, and with an alerting path for the case where it fails anyway.

Identifying the pivot explicitly during design is a small exercise that prevents the common failure of discovering during an incident that a saga has no clean way forward or back.