3 ms·
MongoDB also uses update-in-place with mmap rather than versioned data, which means that a kick-out-the-plug error is very likely to trash data even if you get
by JulianMorrison 17y ago
MongoDB also uses update-in-place with mmap rather than versioned data, which means that a kick-out-the-plug error is very likely to trash data even if you get the database to successfully repair into a usable state. IOW, they're a bit iffy on the C as well as the D of ACID. As a trade-off for this, you get speed and non-garbage-creating updates if all you're doing is changing an existing value.
- alexpopescu 17y agoI think you are correct about the C and D. Considering replication is currently asynchronous it is clear that we cannot really talk about C.
- JulianMorrison 17y agoAsync replication can be consistent if it preserves transaction ordering and boundaries. In MongoDB that boundary is around each one update/insert operation. So async replication isn't the consistency loss - the problem is that transaction boundaries are only weakly respected within one operation. The old data is not preserved while its new value is being written. Catastrophic shutdown could leave a record half-altered.