读书人

MongoDB 哪些地方能产生锁

发布时间: 2013-01-28 11:49:56 作者: rapoo

MongoDB 哪些地方会产生锁?

Which operations lock the database?

原文:http://docs.mongodb.org/manual/faq/concurrency/#what-type-of-locking-does-mongodb-use

?

The following table lists common database operations and the types of locks they use.

?

OperationLock TypeIssue a queryRead lockGet more data from a cursorRead lockInsert dataWrite lockRemove dataWrite lockUpdate dataWrite lockMap-reduceRead lock and write lock, unless operations are specified as non-atomic. Portions of map-reduce jobs can run concurrently.Create an indexBuilding an index in the foreground, which is the default, locks the database for extended periods of time.db.eval()Write lock. db.eval() blocks all other JavaScript processes.evalWrite lock. If used with the nolock lock option, the eval option does not take a write lock and cannot write data to the database.aggregate()Read lock

读书人网 >其他数据库

热点推荐