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

replace ShardResolver with RemoteCommandTargeter::findHost

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.3.6
    • None
    • Sharding
    • Fully Compatible
    • Sharding 12 (04/01/16), Sharding 14 (05/13/16)
    • 0

    Description

      ShardResolver provides

      chooseWriteHost(OperationContext* txn,
                                   const std::string& shardName,
                                   ConnectionString* shardHost) const
      

      method that duplicates ReplicaSetMonitor functionality. It is used to find a host to write which is either the only host of a MASTER connection or primary for a SET connection.
      Instead the call

      grid.shardRegistry()->getShard(txn, shardId)->getTargeter()->findHost(kPrimaryOnlyReadPreference)
      

      will do the same.

      Attachments

        Activity

          People

            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            misha.tyulenev@mongodb.com Misha Tyulenev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: