[SERVER-23336] replace ShardResolver with RemoteCommandTargeter::findHost Created: 24/Mar/16  Updated: 15/Jul/16  Resolved: 10/May/16

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

Type: Task Priority: Major - P3
Reporter: Misha Tyulenev Assignee: Esha Maharishi (Inactive)
Resolution: Done Votes: 0
Labels: ShardRegistry
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-19027 Get rid of ShardResolver Closed
is duplicated by SERVER-24112 only include libs required for MONGO_... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 12 (04/01/16), Sharding 14 (05/13/16)
Participants:
Linked BF Score: 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.



 Comments   
Comment by Githook User [ 10/May/16 ]

Author:

{u'name': u'Esha Maharishi', u'email': u'esha.maharishi@mongodb.com'}

Message: SERVER-23336 replace ShardResolver with RemoteCommandTargeter::findHost
Branch: master
https://github.com/mongodb/mongo/commit/9e29541c86ee52c459e3c7090291ff029dfc6889

Comment by Githook User [ 09/May/16 ]

Author:

{u'name': u'Esha Maharishi', u'email': u'esha.maharishi@mongodb.com'}

Message: Revert "SERVER-23336 replace ShardResolver with RemoteCommandTargeter::findHost"

This reverts commit d1957fd1f86510c37a893ec3c51140cf004407d5.
Branch: master
https://github.com/mongodb/mongo/commit/78c38583efe92db429ed0cb611dd0919f2d890ea

Comment by Githook User [ 09/May/16 ]

Author:

{u'name': u'Esha Maharishi', u'email': u'esha.maharishi@mongodb.com'}

Message: SERVER-23336 replace ShardResolver with RemoteCommandTargeter::findHost
Branch: master
https://github.com/mongodb/mongo/commit/d1957fd1f86510c37a893ec3c51140cf004407d5

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