mongodb的写锁定发生在什么级别? [英] What level does mongodb write lock take place?

查看:110
本文介绍了mongodb的写锁定发生在什么级别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始研究可能经常有大量论文的项目技术.我想知道mongo在什么级别进行写锁定?是在服务器级别还是在数据库级别?我已阅读 http://www.mongodb.org/display/DOCS/工作方式+并发性+工作方式,但官方文档说. a write operation can block all other operations.

I am beginning to research technology for a project, that can have frequent large writes. I am wondering at what level does mongo write lock take place? Is it at the server level or database level? I have read http://www.mongodb.org/display/DOCS/How+does+concurrency+work but official documentation says. a write operation can block all other operations.

对我来说,这意味着写锁定是服务器级别的,但我希望它们是数据库级别的.有人可以确认还是拒绝?

To me this means write locks are server level but I am hoping they are db level. Could someone please confirm or deny this?

推荐答案

目前,MongoDB确实确实具有全局服务器锁定.但是,如果必须从磁盘加载内存块,还有一些其他代码可以释放锁.它为此使用了锁收益.尽管这不能解决所有并发问题,但可以解决许多通常与之相关的问题.这篇文章对此进行了很好的描述: http://blog.pythonisito.com/2011 /12/mongodbs-write-lock.html

At the moment, MongoDB does indeed have a global server lock. However, there is some additional code that will release the lock in case memory blocks have to be loaded from disk. It uses lock-yielding for that. Although this does not solve all concurrency issues, it addresses quite a few of the generally associated problems. This post describes it well: http://blog.pythonisito.com/2011/12/mongodbs-write-lock.html

从MongoDB 2.2开始,将有一个数据库级别的锁,并且还完成了更多的关于产量的工作.

From MongoDB 2.2, there will be a database-level lock, and also more work on yielding is done.

这篇关于mongodb的写锁定发生在什么级别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆