Halfway Looks Finished

A saga charges the card in step 2 and reserves inventory in step 3. Between them, the support console reads the order and shows it as paid and confirmed. Step 3 then fails, the saga refunds the charge, and support has already promised the customer their order. What is going on?

A

The steps are in the wrong order; charging the card must always be the first step of a saga so nothing precedes it

B

Sagas give no isolation, so intermediate state is readable; the countermeasure is a semantic lock marking the order PENDING

C

The local transactions ran at too weak an isolation level; setting SERIALIZABLE on each step prevents this read of half-finished work

D

The compensating transaction was not idempotent, so the refund left the order row in a mixed state that the console misread