[SERVER-80963] Prevent lock upgrade in ShardingRecoveryService::acquireRecoverableCriticalSectionBlockWrites when using config namespace Created: 11/Sep/23  Updated: 29/Oct/23  Resolved: 03/Oct/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: Jordi Serra Torrens
Resolution: Fixed Votes: 0
Labels: car-71-backport-declined, shardingemea-qw
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:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2023-10-16
Participants:
Story Points: 1

 Description   

In ShardingRecoveryService::acquireRecoverableCriticalSectionBlockWrites we take a database IS lock and a collection S lock. Then later we may insert a document into the config.collection_critical_sections collection, which takes database and collection IX locks. Thus if the namespace originally passed into the function is in the config database, we'll end up upgrading our database lock from IS to IX.



 Comments   
Comment by Githook User [ 03/Oct/23 ]

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-80963 Prevent lock upgrade in ShardingRecoveryService::acquireRecoverableCriticalSectionBlockWrites when using config namespace
Branch: master
https://github.com/mongodb/mongo/commit/a161212b8ad68ab67dba46a1d2e1ebef60f4e8a6

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