I am creating some training that is focused on sharding, during one of my exercises I noticed that the returned error message has a spelling error:
MongoServerError[AlreadyInitialized]: Collection 'testRandom.testData' already exists with a differnt shard key. Requested { customerID: 1, dtg: 1 } but found { dtg: 1 }
Note the differnt, which should be different.
The offending line of code can be found at: https://github.com/mongodb/mongo/blob/master/src/mongo/db/s/create_collection_coordinator.cpp#L821