3 ms·
We can put data into MongoDB faster than we can get it out of MySQL during the migration. Yes, with the small caveat that Mongo doesn't respond to any queries[
by moe 15y ago
We can put data into MongoDB faster than we can get it out of MySQL during the migration.
Yes, with the small caveat that Mongo doesn't respond to any queries[1] while you do that.
So better don't try such a bulk operation on a production Mongo.
[1] http://2.bp.blogspot.com/_VHQJkYQ5-dY/TUO3RAn8SNI/AAAAAAAABqs/FJKgl_HgBWA/s1600/mongo-rw-fail.png http://2.bp.blogspot.com/_VHQJkYQ5-dY/TUO3RAn8SNI/AAAAAAAABq...
- jzawodn 15y agoAs the original author of that quote, no. I was running MongoDB in "safe" mode where it doesn't return until the query has been ack'd. Furthermore, I was running with w=2 meaning that at least one other note also had to ack the data.
- moe 15y agoWell, I've observed the same behaviour on a single-node mongo during bulk imports, without special configuration changes. Edit: Not sure why it's getting downvoted. You can reproduce it fairly easily by performing bulk writes - esp. deletes, but also mongoimport or just a write-loop. The global lock is a known problem.