-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
CAR Team 2024-02-05
-
150
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.
- is caused by
-
SERVER-80135 Allow ShardCollection to work correctly when an unsharded collection is not located on the DBPrimary
- Closed