[SERVER-85657] Unsplittable_collections_created_on_any_shard_passthrough may attempt to recreate a collection on a different shard Created: 24/Jan/24 Updated: 02/Feb/24 Resolved: 02/Feb/24 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 8.0.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Allison Easton | Assignee: | Allison Easton |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Sprint: | CAR Team 2024-02-05 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 150 | ||||||||||||
| Description |
|
In the implicitly_create_unsplittable_collections_on_random_shards override file, we override both the getCollection and createCollection helpers. In each override, we call createUnsplittableCollectionOnRandomShard and we only check if the collection already exists in the getCollection override. SERVER-80135 caused the create collection coordinator to emit an error if a collection is created with a different data shard than the collection currently lives on (before this would return ok). This means that if a test creates an unsplittable collection on shard 0 via getCollection and then explicitly creates that collection, the override for createCollection may try to create the collection on shard 1, causing an AlreadyInitialized error. We should add a check to the createCollection override that doesn't attempt to create the collection if it already exists. |
| Comments |
| Comment by Githook User [ 02/Feb/24 ] |
|
Author: {'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}Message: GitOrigin-RevId: bd07bb975bc97a29edd75e44a2e74fe843350e15 |