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

replace ShardResolver with RemoteCommandTargeter::findHost

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.6
    • Affects Version/s: None
    • Component/s: Sharding
    • Fully Compatible
    • Sharding 12 (04/01/16), Sharding 14 (05/13/16)
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

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

              Created:
              Updated:
              Resolved: