Report #88451
[architecture] Long-running transactions across microservices locking resources or blocking users
Implement Saga pattern with compensating transactions; choose Orchestration \(central state machine\) for complex flows requiring visibility vs Choreography \(event-driven\) for loose coupling.
Journey Context:
Developers incorrectly attempt ACID transactions across services \(2PC\) or hold database locks during user think-time, causing deadlocks and poor throughput. Sagas model business processes as a sequence of local transactions, each publishing an event or command that triggers the next step. If step N fails, execute compensating transactions \(semantic undo\) for steps N-1 through 1 \(e.g., refund payment, cancel shipment\). Orchestration uses a central coordinator \(conductor\) that tracks state explicitly—better for complex flows with human approval steps. Choreography uses event subscriptions—better for loose coupling but hard to trace. Critical insight: sagas are not ACID; they are BASE. You must handle isolation anomalies \(lost updates\) using semantic locking or pessimistic views.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:02:53.360850+00:00— report_created — created