3 ms·
> Implications: if you run a query in production that doesn't hit an index, all traffic stops Even if Mongo did have a global write lock, which it doesn't as h
by snmaynard 13y ago
> Implications: if you run a query in production that doesn't hit an index, all traffic stops
Even if Mongo did have a global write lock, which it doesn't as has already been covered, it yields on page faults which means that other queries are minimally impacted. See: http://docs.mongodb.org/manual/faq/concurrency/#does-a-read-or-write-operation-ever-yield-the-lock http://docs.mongodb.org/manual/faq/concurrency/#does-a-read-...
- arohner 13y agoMongo does have a global write lock. A per-db lock does me very little good when I only have one DB. As to your linked doc, emphasis added: > In some situations, read and write operations can yield their locks. > Long running read and write operations, such as queries, updates, and deletes, yield under many conditions. In practice, I've been bitten hard by this. A new feature rolls out, and users can't log in anymore, because a query is taking 2 minutes to run.
- cbsmith 13y agoThat's solves the contention problem, but just by virtue of yields on page faults being a big feature you can see where Mongo does have some scaling issue.