[SERVER-31716] mapReduce can create sharded output collection on shards with wrong UUID if drop/recreate called concurrently Created: 25/Oct/17  Updated: 27/Oct/23  Resolved: 23/Jan/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.6.0-rc1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Gone away Votes: 0
Labels: PM-1017
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-30780 Map/reduce with sharded output tempor... Closed
Assigned Teams:
Sharding
Operating System: ALL
Participants:

 Description   

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.


Generated at Thu Feb 08 04:27:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.