[SERVER-70486] Reduce the number of mutex locks in ClusterCursorManager Created: 11/Oct/22  Updated: 12/Sep/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Romans Kasperovics Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: neweng, sharding-common-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-70256 Fix the race condition in ClusterCurs... Closed
Assigned Teams:
Query Execution
Participants:

 Description   

There are at least two cases where we can avoid some mutex locks in ClusterCursorManager class:

  • ClusterCursorStats::appendAtLeaf() calls ClusterCursorManager::stats() and ClusterCursorManager::cursorsTimedOut(), both of which require a mutex lock. For both methods appendAtLeaf() is the only caller, so we can combine them.
  • ClusterCursorManager::killMortalCursorsInactiveSince locks two times, which also can be reduced to just one lock.

Generated at Thu Feb 08 06:16:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.