-
Type: Improvement
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: MapReduce
-
Labels:
-
Query
Having renameCollection do the dropping makes it more atomic by doing it in a single WriteUnitOfWork and generating a single oplog entry. Currently, it is possible for the drop to become durable or replicate without the rename. Also it is possible for a secondary reader to see the state between the drop and rename.
Agg $out already uses dropTarget rather than an explicit drop.