Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-25058

add countOnConfig() method to Shard so that local count commands can use readAfterOpTime

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 3.3.9
    • Sharding
    • None
    • Sharding 17 (07/15/16)

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

      Attachments

        Activity

          People

            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: