简体   繁体   English

MongoDB并发

[英]MongoDB Concurrency

I'm a little confused about MongoDB's read locking. 我对MongoDB的读锁定有点困惑。 How many concurrent read operations can a single collection support? 单个集合支持多少个并发读取操作?

As written in the link given by tk : http://www.mongodb.org/pages/viewpage.action?pageId=7209296 正如tk给出的链接所示: http//www.mongodb.org/pages/viewpage.action? pageId = 7109296

Read/Write Lock 读/写锁定

mongod uses a read/write lock for many operations. mongod对许多操作使用读/写锁。 Any number of concurrent read operations are allowed , but typically only one write operation (although some write operations yield and in the future more concurrency will be added). 允许任意数量的并发读操作 ,但通常只有一个写操作(尽管一些写操作会产生,并且将来会增加更多的并发)。 The write lock acquisition is greedy: a pending write lock acquisition will prevent further read lock acquisitions until fulfilled. 写锁定采集是贪婪的:待处理的写锁定采集将阻止进一步的读锁定采集,直到满足为止。

Typical read/write lock 典型的读/写锁定

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM