[SERVER-44155] Validate a subset of latches of all levels Created: 22/Oct/19  Updated: 29/Oct/23  Resolved: 09/Dec/19

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

Type: Improvement Priority: Major - P3
Reporter: Benjamin Caimano (Inactive) Assignee: Rahul Sundararaman (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File latches-analysis-2019-11-26.yaml    
Issue Links:
Depends
depends on SERVER-42892 Create set and key types for hierarch... Closed
depends on SERVER-42897 Validate base-level latches Closed
Duplicate
is duplicated by SERVER-42898 Implement hierarchical locking for mo... Closed
is duplicated by SERVER-42899 Implement hierarchical locking for mo... Closed
is duplicated by SERVER-42900 Implement hierarchical locking for mo... Closed
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2019-12-02, Service Arch 2019-12-16
Participants:

 Description   

We should annotate the subset of latches in mongo::transport, mongo/executor, and mongo/util/concurrency. This involves the following:

  • Modify MONGO_MAKE_LATCH to have a variadic argument list that it passes to the Mutex constructor. This allows the last argument to optionally be a HierachicalAcquisitionLevel.
  • Add a HierarchicalAcquisitionSet to the LatchSetState decoration and add/remove using the LockListener from SERVER-42897
  • Change MONGO_MAKE_BASE_LATCH to set HierachicalAcquisitionLevel(0) instead of isBaseLatch=false
  • Change a collection of higher-level latches to have HierachicalAcquisitionLevels. These latches will most likely derive their levels from latches of a lower level than them.


 Comments   
Comment by Billy Donahue [ 19/Sep/20 ]

review was https://mongodbcr.appspot.com/542750094/

Comment by Githook User [ 03/Mar/20 ]

Author:

{'name': 'Ben Caimano', 'email': 'ben.caimano@10gen.com'}

Message: SERVER-43945 Expose out of order latch acquisitions in serverStatus

This commit also backports:

SERVER-42897 Validate base-level latches
SERVER-44746 Fix LatchAnalyzerTest
SERVER-44155 Validate a subset of latches of all levels
SERVER-45691 Change Mutex::LockListeners to use a std::vector again
SERVER-45793 Improve mongo::Mutex contract
SERVER-45424 Track local latch::Identities when getTestCommandsEnabled()
SERVER-46041 Add DiagnosticListener/WaitListener LSAN suppressions
SERVER-46461 Make static in getDiagnosticListenerState() immortal to fix destruction order issues during shutdown
SERVER-46197 Make build flag to disable diagnostic latches
SERVER-45276 Release lock before destroying DBClientBases
Branch: v4.2
https://github.com/mongodb/mongo/commit/24b6ee2dd48e3f1cfde1c4d7e2b01bd73921fbad

Comment by Githook User [ 09/Dec/19 ]

Author:

{'name': 'Rahul Sundararaman', 'email': 'rahul.sundararaman@mongodb.com'}

Message: SERVER-44155 Validate a subset of latches of all levels
Branch: master
https://github.com/mongodb/mongo/commit/4f00d6e3d7e54a2d131b8216d4b4ef9bfd7a7c6b

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