3 ms·
One thing that turned me away from MongoDB was their utter lack of care for your data integrity that they displayed for years. Some of those instances were even
by outworlder 5y ago
One thing that turned me away from MongoDB was their utter lack of care for your data integrity that they displayed for years. Some of those instances were even documented. Then there were some bad defaults - some could _also_ cause data loss.
For any component that's viewed as a database (as opposed to, say, cache), data integrity is one of the most important metrics (if not THE most).
In contrast, PostgreSQL data loss bugs are rare - and are treated extremely seriously. Defaults are sane and won't lose data. It's one of the few databases I'm pretty confident that data will be there even if you yank a server power cord mid writes.
Has MongoDB improved? Yes, leaps and bounds(seems to still fail Jepsen tests though). But I can't help but feel that it should have been released as a beta product, instead of claiming it was production ready. It wasn't. Maybe it is now. I'd still evaluate other alternatives before considering it.
That said, one thing that always amuses me is how MongoDB gets mentioned in the same context as PostgreSQL. If PostgreSQL would meet your needs, it's unlikely that MongoDB would. And vice-versa(but maybe something else like Cassandra would).
- threeseed 5y agoThose defaults were changed a decade ago and were never an issue if you used a driver eg. Python. And the Jepsen tests are part of the core test suite so do you some evidence they are still failing. It’s so ridiculous and pointless to be rehashing the same issues a decade later. Actually more a testament to the company that it’s still hugely successful and depended on by some very large applications.
- dralley 5y agoPerhaps, but mongodb was responsible for something I have bookmarked as "the worst line of code ever". Which decided whether or not to log connection warnings based on Math.random() https://github.com/mongodb/mongo-java-driver/blob/1d2e6faa80aeb5287a26d0348f18f4b51d566759/src/main/com/mongodb/ConnectionStatus.java#L212-L215 https://github.com/mongodb/mongo-java-driver/blob/1d2e6faa80...
- threeseed 5y agoa) This is a line of code from 2013 and was fixed weeks after. b) Based on the JIRA [1] it was designed to only log 10% of subsequent failures where there is no connection to prevent log flooding. You would still get the initial failure message. Pretty reasonable technique and hardly the worst code ever. [1] https://jira.mongodb.org/browse/JAVA-836 https://jira.mongodb.org/browse/JAVA-836
- __turbobrew__ 5y agohttps://github.com/mongodb/mongo-java-driver/commit/d51b3648a8e1bf1a7b7886b7ceb343064c9e2225#diff-a4601c990f57148121efae9587a61e61afb4b7eb3f1f5537ad5aded607c5a0c3R212 https://github.com/mongodb/mongo-java-driver/commit/d51b3648...
- btown 5y agoPostgres with tables that are just an ID and a JSONB column nowadays give you practically everything you'd want out of MongoDB. You can add deep and customized indices as desired, you can easily shard with Citus, and if you want to live without transactions you'll see equally good if not better performance - with the option to add ACID whenever you want. The developer experience argument, where the ->> operator was more confusing than brackets, is now moot. As a former MongoDB user, there were good synergies between MongoDB and Meteor back in the day, and I loved that tech, but between Materialize and Supabase, you have vastly more options for realtime systems in the Postgres ecosystem.
- TedShiller 5y agoAlthough MongoDB claims in an undated article entitled "MongoDB and Jepsen"[65] that their database passed Distributed Systems Safety Research company Jepsen's tests, which it called “the industry’s toughest data safety, correctness, and consistency Tests”, Jepsen published an article in May 2020 stating that MongoDB 3.6.4 had in fact failed their tests, and that the newer MongoDB 4.2.6 has more problems including “retrocausal transactions” where a transaction reverses order so that a read can see the result of a future write.[66][67] Jepsen noted in their report that MongoDB omitted any mention of these findings on MongoDB's "MongoDB and Jepsen" page. from https://en.wikipedia.org/wiki/MongoDB#Bug_reports_and_criticisms https://en.wikipedia.org/wiki/MongoDB#Bug_reports_and_critic...