[SERVER-73101] Avoid upgrading locks in db unit tests 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   

Specifically:
db_s_shard_server_test, db_repl_test, db_concurrency_test, db_unittest_test, db_catalog_test

I took a look at the first test and we acquire an IX lock on the collection and then upgrade to a MODE_X lock in "_setFilteringMetadataByUUID". We can acquire the MODE_X lock right away and avoid the upgrade. I assume that the other unit tests will take a similar approach to avoid upgrading locks so I'm lumping them together.



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

Author:

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

Message: SERVER-73101 Avoid lock upgrades in unit tests
Branch: master
https://github.com/mongodb/mongo/commit/6655fdc86ed1b97df85ac7a426dc33ca3ae791f2

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