It's not possible to lock a mongodb document. What if I need to?

前端 未结 12 1661
死守一世寂寞
死守一世寂寞 2020-12-24 11:34

I know that I can\'t lock a single mongodb document, in fact there is no way to lock a collection either.

However, I\'ve got this scenario, where I think I need some

12条回答
  •  离开以前
    2020-12-24 12:14

    Update: With MongoDB 3.2.2 using WiredTiger Storage implementation as default engine, MongoDB use default locking at document level.It was introduced in version 3.0 but made default in version 3.2.2. Therefore MongoDB now has document level locking.

提交回复
热议问题