Questions: Saga Pattern for Long-Running Distributed Transactions

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A travel booking saga completes hotel and flight reservations, but the car rental step fails. What does the saga do to recover?

AIt issues a global rollback, atomically reverting all committed transactions as 2PC would
BIt executes compensating transactions in reverse order — cancelling the flight, then cancelling the hotel — to semantically undo the completed steps
CIt retries the car rental step indefinitely until the service recovers
DIt marks all steps as 'pending' and holds locks until the car rental service responds
Question 2 Multiple Choice

Why must every step in a saga — both the forward transactions and the compensating transactions — be designed to be idempotent?

ATo satisfy the ACID atomicity requirement that all-or-nothing execution imposes
BBecause network failures can cause a message to be delivered and processed more than once; idempotence guarantees the same outcome whether a step runs once or multiple times
CTo allow the saga coordinator to parallelize steps safely
DBecause distributed systems cannot guarantee message ordering, making duplicates inevitable during normal operation
Question 3 True / False

Sagas provide the same atomicity guarantees as two-phase commit — nearly every step either most commits or most aborts — but without blocking on global locks.

TTrue
FFalse
Question 4 True / False

In a saga, compensating transactions semantically reverse completed steps but are not true database rollbacks, because the original local transactions have already committed and made their changes durable.

TTrue
FFalse
Question 5 Short Answer

What is the fundamental difference between a saga's compensating transaction and a traditional 2PC abort/rollback, and why does this distinction matter for application design?

Think about your answer, then reveal below.