A MongoDB Garbage Collection
mathias-biilmann.net
mathias-biilmann.net
Is there a better way to move a document to another collection with out inserting into the new collection and then deleting?
I am guessing it wouldn't be a straight move, youd actually have something like this in your document {collection_from: users, timestamp: now(), data: $moved_collection_data}
But in the end, there's no other way to do the move than creating a copy and then deleting the original. This is also neither atomic nor transactional, but since we create the copy in the garbage collection before deleting we won't loose data no matter what...