Is it possible to implement Multi-Version Concurrency Control (MVCC) on top of MongoDB?

前端 未结 5 443
广开言路
广开言路 2020-12-31 20:09

MongoDB is to me a great database. However there are cases where I really need atomic multi-document transactions. For example to transfer things (like money or reputation)

5条回答
  •  醉梦人生
    2020-12-31 21:03

    The simplest way is to use locks (two-phase commit), although this is not very efficient in some cases. For higher concurrency some kind of MVCC can be implemented on the top of Mongo. This article provides a good description:

    http://highlyscalable.wordpress.com/2012/01/07/mvcc-transactions-key-value/

提交回复
热议问题