SERVER-87316 added a check for the cluster cardinality parameter before allowing moveCollection. This ensures that there is no data loss due to direct shard connections when moving a tracked collection because we are certain that all direct connections have been stopped before any tracked collections can be moved.
However, with the other data movement commands (moveChunk, movePrimary, resharding) it would still be possible. The case we are considering is the one in which a data movement command is issued after the second shard is added to the cluster but before the cluster cardinality parameter has been updated since this is not done atomically.
By doing the same check as SERVER-87316 added for moveCollection elsewhere, we will close this gap.
- is related to
-
SERVER-88163 direct writes to shards can end up writing to orphans
- Closed
-
SERVER-87316 Check the cluster cardinality parameter before tracking and moving a collection
- Closed