-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Sharding
Map/reduce with a sharded output collection performs an optimization where the final reduce step is omitted and the previous reduce step is done in parallel on all shards. This is done by creating an empty sharded collection and spreading the chunks so they are co-located with the data to be reduced based on the shard key, writing all output locally to an empty temporary collection and then renaming the temporary collection to the name of the output collection.
This process only works if no chunks of the output collection move around while the output is being written and is protected through the usage of the collection distributed lock.
This task is to get rid of this reliance on the collection distributed lock.