[SERVER-25058] add countOnConfig() method to Shard so that local count commands can use readAfterOpTime Created: 14/Jul/16  Updated: 16/Jul/16  Resolved: 15/Jul/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.3.9
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Esha Maharishi (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: Sharding 17 (07/15/16)
Participants:

 Description   

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().


Generated at Thu Feb 08 04:08:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.