[SERVER-53332] Change ShardRegistry::_connStringLookup to store connection strings as std::strings Created: 10/Dec/20  Updated: 29/Oct/23  Resolved: 07/Jan/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.9.0, 4.4.10

Type: Bug Priority: Major - P3
Reporter: Janna Golden Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Participants:
Linked BF Score: 115

 Description   

SERVER-47359 added a new map '_connStringLookup' that stores mappings from connection strings to Shard objects. We saw a decent perf hit after SERVER-47359 was committed. A small and easy fix to gain perf back is to change '_connStringLookup' to store connection strings as std::strings instead of ConnectionString objects to avoid having to parse the "shardId" parameter passed to ShardRegistry::getShard and ShardRegistry::getShardNoReload to a ConnectionString each time.



 Comments   
Comment by Githook User [ 30/Sep/21 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-53332 Change ShardRegistry::_connStringLookup to store connection strings as std::strings
Branch: v4.4
https://github.com/mongodb/mongo/commit/58ee9a806ec4ebb0cca181294688911997d714c4

Comment by Ian Whalen (Inactive) [ 09/Jan/21 ]

Author:

{'username': u'evrg-bot-webhook', 'name': u'Pierlauro Sciarelli', 'email': u'pierlauro.sciarelli@mongodb.com'}

Message:SERVER-53332 Change ShardRegistry::_connStringLookup to store connection strings as std::strings
Branch:master
https://github.com/mongodb/mongo/commit/780da441c823b2bb6e3742202c70e86d06f87212

Comment by Pierlauro Sciarelli [ 07/Jan/21 ]

Link to commit (github-jira hook doesn't seem to work)

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