Report #54904
[architecture] Two-phase commit blocking and deadlock across microservices
Implement Saga pattern using orchestration \(central controller\) for complex flows or choreography \(event-driven\) for loose coupling; define compensating transactions for every step that cannot be rolled back natively
Journey Context:
2PC holds locks during network latency; if the coordinator fails, resources remain locked until timeout, creating cascading unavailability. Sagas relax ACID for BASE—each step commits locally, and on failure, compensating actions undo previous steps \(e.g., credit back money, cancel shipment\). Orchestration vs Choreography tradeoff: Orchestration \(centralized\) is easier to debug and handles complex sequencing but creates a single point of failure and coupling to the orchestrator. Choreography \(decentralized events\) is more resilient and loosely coupled but harder to trace and risks circular dependencies. Common errors: missing compensating actions \(assuming 'rollback' works across services\), not handling partial compensation failure \(create a 'compensation log' for human intervention\), or mixing sync RPC calls inside sagas \(defeats the purpose—use async messages\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:39:03.784767+00:00— report_created — created