If mapReduce is run with sharded output, mongos sends the UUID for the sharded output collection to the shards as part of the second phase, so that shards create the collection on themselves with the correct UUID.
However, there is a window in between when mongos calls shardCollection on the config server to obtain the UUID and takes the distlock itself in which the output collection can be dropped, recreated, and re-sharded with a different UUID.
This is the only place mongos tells shards what UUID to use when creating a collection.
- is related to
-
SERVER-30780 Map/reduce with sharded output temporarily creates two collections with the same UUID
- Closed