[SERVER-80942] Prevent lock upgrade in createIndexes under transaction Created: 11/Sep/23  Updated: 29/Oct/23  Resolved: 15/Sep/23

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

Type: Improvement Priority: Major - P3
Reporter: Gregory Noma 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 NAMR Team 2023-09-18
Participants:

 Description   

In the createIndexes command, there are a couple checks we do under IS locks before releasing those locks and then later taking IX locks. However if we are in a transaction, then shared locks participate in two-phase locking and those those IS locks won't actually be released before acquiring the IX locks. Thus a lock upgrade will occur.



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

Author:

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

Message: SERVER-80942 Prevent lock upgrade in `createIndexes` under transaction
Branch: master
https://github.com/mongodb/mongo/commit/67ab390bc4224d45026f1cab2087331502313b40

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