-
Type:
Task
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: 3.3.9
-
Component/s: Sharding
-
None
-
Sharding 17 (07/15/16)
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
The mongos version of removeShard used to call count() on the configs through Shard::runCommand, going through ShardRemote.
Since Shard::runCommand does not take a readConcern, the readConcern was created externally and provided directly through the cmdObj, and would get processed by the remote shard. (readConcern was necessary for readAfterOpTime).
The config version of removeShard will go through ShardLocal, whose runCommand does not process the readConcern part of the cmdObj.
Rather than making Shard::runCommand take a readConcern (which is nonsensical for most generic commands), add a specific countOnConfig() method to the Shard interface, with local and remote implementations.
To mirror Shard::exhaustiveFindOnConfig, the remote implementation should use grid.configOpTime() to obtain the opTime for the readAfterOpTime part of the readConcern, and the local implementation should use _getLastOpTime().