0

I've read that MongoDB has two types of storage engine you can choose from: MMAPv1 and WiredTiger.

It seems that one of the differences between the two is the granularity of consistency locks. MMAPv1 seems to have collection/document-level locks and WiredTiger only has document-level locks.

However in the official MongoDB FAQs, it seems to say that

MongoDB supports ACID transactions at the document level.

It seems that these are conflicting statements. I'm currently using MongoDB pre-3.0 with MMAPv1, does that mean all writes will lock the whole collection or just at the document-level?

StevenDaGee
  • 127
  • 1
  • 6
  • 1
    That question has answers which regularly update as things change. Suporting ACID actually has nothing to do with Locking per se. "Locking" is more about "concurrency". Atomicity is something else and not dependant. So that's the other duplicate. – Neil Lunn Nov 15 '17 at 05:46
  • I guess my question is: If MMAPv1 can lock the collection, how can it not support ACID multi-document writes in the same locked collection? – StevenDaGee Nov 15 '17 at 05:59
  • 2
    That's why I think it's duplicated in **"two"** previous questions and their answers. So I suggest you read all answers on both. By no means the first person to ask about ACID in MongoDB. – Neil Lunn Nov 15 '17 at 06:01

0 Answers0