Cloning collections as part of movePrimary currently checks that the collection options match between the source and the destination shards. This comparison is not fully correct, because it is possible that the two nodes might have different storage engines and/or options for the storage engines.
Instead of binary-comparing the entire options object, the cloner should instead just check for UUID match.
This will effectively be the "algorithm" of the cloner.
For each collection from the source:
- If collection doesn't exist on the destination, then create and clone it
- If the collection exists on the destination and:
- Is sharded on the source, then fail the clone
- Is not sharded on the source, then just compare the UUIDs and if they don't match, fail the clone