简体   繁体   中英

Read and Write Simultaneosuly from Different mongodb capped collections in same database

I have a database with multiple small-sized capped collections (about 1MByte each) that I am using in tailable cursor mode. Is it possible to read and write simultaneosuly from different mongodb capped collections in this database (ie tail (and read) from collection B while writing to collection A). I read that mongodB locks the database on a write. Is this true?

In MongoDb 2.6, locking is done on collection level. and in MongoDb 3.0, document level locking is done.

so it is possible to read from one collection and write to and other collection using cursor from MongoDb 2.6 onwards.

http://www.infoq.com/news/2014/04/MongoDB-2.6-Kelly-Stirman

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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