MongoDB Two Phase Commit: The Old Pattern vs Real Transactions
Skip the hand-rolled MongoDB two phase commit unless you’re on a standalone server or a version older than 4.0. A real multi-document transaction did the same transfers 3 to 6 times faster in my runs. Quick answer: the pattern logs each transfer in a transactions collection, walks it through initial, pending, applied and done, and … Read more >>