[SERVER-85913] Adapt DDL locks to support transactions Created: 30/Jan/24  Updated: 01/Feb/24  Resolved: 01/Feb/24

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

Type: Task Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Pierlauro Sciarelli
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-81937 Support creation of unsplittable coll... In Progress
Backwards Compatibility: Fully Compatible
Sprint: CAR Team 2024-02-05
Participants:

 Description   

The database and collection DDL locks are currently not usable in transactions because they're handled by the locker as simple mutexes.

Those should be the needed changes to support their use in transactions:

  • Allow them to be held by the WUOW by delaying unlocking (move those down)
  • Relax this assertion because transactions hold the global lock in IX mode
  • Acquire the db/collection locks in mode IX rather than IS when checking for the shard primary (here and here) because transactions would later try to promote them to IX (invalid transition)


 Comments   
Comment by Githook User [ 31/Jan/24 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-85913 Adapt DDL locks to support transactions (#18496)

GitOrigin-RevId: 50433cd9b355b79b951b85865168fef6c3438af2
Branch: master
https://github.com/mongodb/mongo/commit/a752a3d1f473c40d2630e67653ae914ec979bcd7

Comment by Githook User [ 31/Jan/24 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: Revert "SERVER-85913 Adapt DDL locks to support transactions (#18496)"

This reverts commit b471ddb92099726b91024ef7d3be665a2c588f47.

GitOrigin-RevId: 087082b08ac27ee3ba27185fb2b649f332fffff7
Branch: master
https://github.com/mongodb/mongo/commit/bc5b98c07019cbe66c5a8f6d40a370fb47462e29

Comment by Githook User [ 31/Jan/24 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-85913 Adapt DDL locks to support transactions (#18496)

GitOrigin-RevId: b471ddb92099726b91024ef7d3be665a2c588f47
Branch: master
https://github.com/mongodb/mongo/commit/9340b95d51a109958ca6ab83c2fa6dc946022067

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