[SERVER-73058] QueryStageCollectionScanTest acquires global IX lock and then calls AutoGetCollectionForRead Created: 19/Jan/23  Updated: 11/May/23  Resolved: 11/May/23

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

Type: Task Priority: Major - P3
Reporter: Fausto Leyva (Inactive) Assignee: Fausto Leyva (Inactive)
Resolution: Won't Do 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
Sprint: Execution Team 2023-04-17, Execution Team 2023-05-01, Execution Team 2023-05-15
Participants:

 Description   

After acquiring the IX lock on the collection level we can use AutoGetCollection instead of AutoGetCollectionForRead: https://github.com/10gen/mongo/blob/c8f6bd7b917856060fdfb2d78dab17b734fc4848/src/mongo/dbtests/query_stage_collscan.cpp#L777-L778

AutoGetCollectionForRead acquires an IS lock which should be covered under the IX lock but oddly enough I ran into an issue with upgrading locks. Could be due to the way I was prohibiting lock upgrades described in SERVER-73040.



 Comments   
Comment by Fausto Leyva (Inactive) [ 11/May/23 ]

During my initial investigation, I thought there was something wrong with this behaviour but MODE_IS and MODE_IX locks are compatible, so this should be a non-issue. Therefore I am closing this ticket out since it has no real significance.

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