SERVER-134533ClosedFixed
Starting shard draining during movePrimary can cause metadata inconsistencies
The configsvrCommitMovePrimary command throws ShardNotFound if the destination shard is found as draining. Because it does this prior to checking if the command had previously succeeded, this can cause the following problematic scenario: # Start movePrimary from shard0 to shard1 # Commit the movePrimary to the config server via [configsvrCommitMovePrimary|https://github.com/10gen/mongo/blob/2a943eb0e55e5030ef5302b2d45bc70c7d688f6d/src/mongo/db/global_catalog/ddl/move_primary_coordinator.cpp#