[SERVER-73043] Avoid upgrading lock in dbtests Created: 19/Jan/23  Updated: 29/Oct/23  Resolved: 05/Sep/23

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

Type: Task Priority: Major - P3
Reporter: Fausto Leyva (Inactive) Assignee: Gregory Noma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-73040 Ban all lock upgrades Closed
Assigned Teams:
Storage Execution NAMER
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2023-03-06, Execution Team 2023-04-03, Execution Team 2023-05-01, Execution Team 2023-05-29, Execution Team 2023-06-12, Execution NAMR Team 2023-09-04, Execution NAMR Team 2023-09-18
Participants:

 Description   

In dbtests.cpp, we upgrade a collection level IX lock to an X lock: https://github.com/10gen/mongo/blob/9b9a63ba1119f69154b360b2758091b64e0310ce/src/mongo/dbtests/dbtests.cpp#L181-L195

Simple fix would be to take the X lock right away but we can also potentially drop the IX lock on the collection before taking the X lock? Either way, if we acquire the IX lock for the collection and go to drop the collection, we would be upgrading the lock so we need to address that. 



 Comments   
Comment by Githook User [ 05/Sep/23 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-73043 Avoid lock upgrades in dbtests
Branch: master
https://github.com/mongodb/mongo/commit/c6b8c0c2acc76cafa8ca6d97a5286805e8fcebe4

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