[SERVER-32015] Reduce contention on ShardingState::_mutex for find workloads Created: 17/Nov/17  Updated: 27/Oct/23  Resolved: 23/Jan/20

Status: Closed
Project: Core Server
Component/s: Querying, Sharding
Affects Version/s: 3.6.0-rc4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding
Operating System: ALL
Sprint: Sharding 2017-12-04
Participants:

 Description   

The find code path currently calls CollectionShardingState::get at least 4 times for preparing a single query.

This causes contention on ShardingState::_mutex, which eventually gets called by that function.

Through some code reshuffling we should be able to remove two of these calls.


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