promise.all reject cause mongodb update rollback?
发布于 5 个月前 作者 jxycbjhc 758 次浏览 来自 问答


1 回复

找到了,好久前看过忘了 官方文档写的也很详细了:Retry Transaction and Commit Operation 里面也提到了

In most cases, multi-document transaction incurs a greater performance cost over single document writes, and the availability of multi-document transaction should not be a replacement for effective schema design. For many scenarios, the denormalized data model (embedded documents and arrays) will continue to be optimal for your data and use cases. That is, for many scenarios, modeling your data appropriately will minimize the need for multi-document transactions.