[SERVER-53678] No-op for filling in destined recipient for insert oplog entries adds overhead on non-shardsvrs Created: 09/Jan/21  Updated: 29/Oct/23  Resolved: 12/Jan/21

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

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
Resolution: Fixed Votes: 0
Labels: PM-234-M3, PM-234-T-oplog-fetch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
is caused by SERVER-49822 Add destined recipient to oplog entri... Closed
Related
related to SERVER-53679 No-op for filling in destined recipie... Closed
related to SERVER-57666 Convert getDestinedRecipient() in res... Closed
related to SERVER-58918 Replace getDestinedRecipient() in the... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2021-01-25
Participants:
Linked BF Score: 0
Story Points: 1

 Description   

getDestinedRecipient() is called by OpObserverImpl for all write operations and returns boost::none when there isn't an ongoing resharding operation. Calling CollectionShardingState::get() and CollectionShardingState::getCollectionDescription() even when sharding isn't enabled adds overhead. ShardingState::enabled() can be used to detect whether the server was started with --shardsvr to avoid the performance regression for stand-alone mongods and replica sets.



 Comments   
Comment by Githook User [ 12/Jan/21 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-53678 Early out getDestinedRecipient() if sharding isn't enabled.
Branch: master
https://github.com/mongodb/mongo/commit/5c45edc253e2300cd5117675f12ba784ab631cd8

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