3 ms·
One option would be to employ a two-phase commit mechanism that keeps track of all "sub-transactions" and considers a global transaction to be completed when al
by rzzzt 2y ago
One option would be to employ a two-phase commit mechanism that keeps track of all "sub-transactions" and considers a global transaction to be completed when all datastores report back that they are very, very certain that they can commit the changes on their end without any issues. Then it asks each local transaction to actually commit.
XA is such a standard that pops up often when data sources support such a mechanism:
- https://en.wikipedia.org/wiki/X/Open_XA https://en.wikipedia.org/wiki/X/Open_XA
- https://dev.mysql.com/doc/refman/8.0/en/xa.html https://dev.mysql.com/doc/refman/8.0/en/xa.html
- https://mariadb.com/kb/en/xa-transactions/ https://mariadb.com/kb/en/xa-transactions/
- akrauss 2y agoI understand. But I'd rather not get into the complexities and new funny failure modes of such a system, so I was hoping for something simpler.