Replies: 1 comment
|
This is a useful demand-gauging question because multi-database transactions are not one small extension to a single-database Tx interface. I would keep the core transaction API single-database and put coordination in a separate package. For most applications, an outbox plus an idempotent Saga is easier to operate: record the intent locally, deliver it with retries, and define compensating actions for partial failure. Two-phase commit is appropriate only when the participants, driver behavior, coordinator, timeout, and recovery semantics are all controlled; it adds blocking and operational failure modes. Before implementing either pattern, define the contract for commit, timeout, retry, cancellation, coordinator restart, and partial success. A small adapter interface with a durable state machine, metrics, and one end-to-end example would establish whether there is enough real demand without bloating the core package. |
Uh oh!
There was an error while loading. Please reload this page.
Context
The current
database.Txinterface supports single-database transactions. Distributed transactions across multiple databases would require significant complexity.Open Questions
Related
All reactions