simplybusiness/mongoid_lazy_migration — pull request #1 by sparrovv (2014-08-06 14:01:38+00:00)
Title: Rake tasks and Index

@amar-shah

Things that I've changed:
- I added index on migration_sate field.
- I tweaked the rake tasks. (cleanup task is written in moped and it iterates over the objects instead of running one multi query.)

I'm not really convinced that changing cleanup task to iterate over the objects instead 1 multi query is better though. My assumption was that this will prevent from write locks on the collection, but I couldn't really prove, that multi query lock prevents from inserting/updating objects. I will try to investigate that further.