[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: |
|
||||||||||||
| 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. |