-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
Fully Compatible
-
CAR Team 2025-07-21
-
1
-
None
-
3
-
TBD
-
🟦 Shard Catalog
-
None
-
None
-
None
-
None
-
None
-
None
When we acquire, promote, or release the critical section, we must first take the database or collection lock in MODE_X for the target resource. Taking this lock drains any in-flight operations and guarantees that the current thread is the only one that can access the resource. Today we obtain the lock through AutoGetDb / AutoGetCollection.
Those RAII objects both
- acquire the requested lock, and
- return a reference to the database/collection, which triggers placement version checks.
For the critical section, step 2) is unnecessary—we only need Lock::DBLock or Lock::CollectionLock. Leaving the placement version check in place can lead to surprising failures.
- related to
-
SERVER-107105 Use MODE_IX instead of MODE_X collection/db lock when exiting the critical section
-
- Closed
-