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#

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.0.29.1.0-rc10229.0.48.3.16
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
bkp