MongoDB MapReduce是否锁定数据库 [英] Does MongoDB MapReduce lock the database

查看:63
本文介绍了MongoDB MapReduce是否锁定数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MongoDB MapReduce作业是否锁定数据库?我正在开发多用户MongoDB Web应用程序,并担心多用户冲突和性能.有人对我有智慧的话吗?

Does a MongoDB MapReduce job lock the database? I am developing a multi-user MongoDB web application and am worried about multi-user conflicts and performance. Does anyone have any words of wisdom for me?

推荐答案

简单的答案?有时候...

Simple answer? Sometimes ...

这在很大程度上取决于您如何使用map/reduce ...但是以我的经验,这从来都不是问题.

It depends a lot on how you are using map/reduce ... but in my experience it's never been a problem.

关于此的信息不多,但在

There isn't much info on this, but it's clearly stated in the docs that is does sometimes lock but it "Allows substantial concurrent operation."

mongodb用户组通常是 ... ...在1.4中,它会产生但并不如预期的那样,在1.5中,它会产生比其他请求更友好."

There are a couple of questions in the mongodb-user group asking about this ... the best response I've seen offically is that ... "in 1.4 it yields but isn't as nice as it should be, in 1.5 its much friendlier to other requests."

这并不意味着它根本不会阻塞,而是与db.eval()阻塞了

That does not mean that it doesn't block at all, but compared to db.eval() which blocks the whole mongod process ... it's your best bet.

也就是说,在1.7.2及更高版本中,现在为db.eval()提供了 nolock 选项

That said, in 1.7.2 and up there is now a nolock option for db.eval() ...

这篇关于MongoDB MapReduce是否锁定数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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