[SERVER-82646] Split the lock in Top class into two Created: 01/Nov/23  Updated: 24/Jan/24  Resolved: 10/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Erin McNulty
Resolution: Fixed Votes: 0
Labels: perf-8.0, perf-tiger, perf-tiger-handoff, perf-tiger-poc, perf-tiger-q4
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2023-11-13
Participants:

 Description   

In the Top class, there is one lock that guards the global histogram metrics and the per collection statistics. These metrics are updated by separate methods and at different times during a query

Since these two pieces of the Top class are independent, they could be guarded by two different locks instead of one lock. This will reduce cache line and atomic concurrency.

POC: https://github.com/10gen/mongo/commit/3c3d7ae8ec93db1ebbb3da3f97f57235c71f5f1e#diff-966f199e499eb2a33268c3e408a24e1477608de7e4d0109641f6fadb31f12d2a



 Comments   
Comment by Githook User [ 10/Nov/23 ]

Author:

{'name': 'Erin McNulty', 'email': 'erin.mcnulty@mongodb.com', 'username': 'erin2722'}

Message: SERVER-82646: Split the lock in Top class into two
Branch: master
https://github.com/mongodb/mongo/commit/191fd4c8e3417ffa0a31f9e689611d7a4c64d18b

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