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

查看:23
本文介绍了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.

这方面的信息不多,但在 docs有时会锁定,但它允许大量并发操作."

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-user 组有几个问题询问 ...我见过的最佳回复 正式是......在 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."

这并不意味着它根本不会阻塞,而是与阻塞 整个 mongod 进程 ...这是你最好的选择.

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 及更高版本中,现在有一个 nolock 选项用于 db.eval() ...

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

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

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