Mongo: Mr Right... or Mr Right Now?(blog.scripted.com) |
Mongo: Mr Right... or Mr Right Now?(blog.scripted.com) |
The box it was hosted on was shut down (possibly uncleanly), and when it came back up, mongod refused to start. I ran mongod --repair and ended up with a running system, but the data was mangled. There were parts of records inside other records and a large amount of data that I just couldn't find. Fortunately, most of it was backed up elsewhere.
I've been told that maybe some other version is more reliable. I've been told I need to configure it properly by hand before I use it. I don't care. This was a trivial single-machine installation and there is one thing any sane database absolutely must do: avoid completely losing all the data that has been stored in it.
Any database can suffer corruption if you shut down the server uncleanly - it depends on the state of the filesystem when it comes back up. That's why you have replication to protect against failure of a single node.
Having run Mongo in production for over 3 years, I've never lost any data despite numerous failure scenarios (including unclean shutdown).
I am, however very hesitant to rely on it for anything now, much as I would be hesitant to touch a machine that previously gave me a severe electric shock even though its creator and other users assure me it's safe now.
Same reason people use SQLite instead of MySQL or Postgres. Don't want to have to deal with keeping a database server up.