-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.0.9, 2.2.7, 2.4.14, 2.6.12, 3.0.15, 3.2.15, 3.4.6
-
Component/s: Sharding
-
None
-
Sharding
-
ALL
On mongos, createIndexes is broadcast to all shards, rather than only shards that own data for the collection.
So, createIndexes can implicitly create collections on shards that don't own data for the collection. When this happens, the collection is implicitly created without the right collection options (collation, compression, etc).
This is a beginning-of-time bug:
- r3.4.6: https://github.com/mongodb/mongo/blob/r3.4.6/src/mongo/s/commands/commands_public.cpp#L228-L229
- r3.2.15: https://github.com/mongodb/mongo/blob/r3.2.15/src/mongo/s/commands/commands_public.cpp#L209
- v3.0.11: https://github.com/mongodb/mongo/blob/v3.0.11/src/mongo/s/commands_public.cpp#L361-L363
- v2.6: https://github.com/mongodb/mongo/blob/v2.6/src/mongo/s/commands_public.cpp#L284
- v2.4: https://github.com/mongodb/mongo/blob/v2.4/src/mongo/s/commands_public.cpp#L184
- v2.2: https://github.com/mongodb/mongo/blob/v2.2/src/mongo/s/commands_public.cpp#L185
- v2.0: https://github.com/mongodb/mongo/blob/v2.0/s/commands_public.cpp#L163
- duplicates
-
SERVER-30344 prevent shards from implicitly creating a collection on createIndexes
- Closed