-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Storage Execution
-
Fully Compatible
-
Execution NAMR Team 2023-08-07
-
200
isCollectionLockedForMode() has a special case where it always returns true if shouldConflictWithSecondaryBatchApplication returns false:
https://github.com/mongodb/mongo/blob/1522b29e65bffd4c438756e5202aef062410864d/src/mongo/db/concurrency/lock_state.cpp#L630-L631
While we might not need to hold locks in this special mode it causes seemingly confusing behavior where the locker reports that locks are held.
We have invariants throughout the codebase that checks if Collections are locked in certain modes. Here are a few that would start firing in certain conditions if the shouldConflictWithSecondaryBatchApplication check is removed from isCollectionLockedForMode
- depends on
-
SERVER-53846 Clarify locking requirements in createCollectionForApplyOps
- Closed
-
SERVER-79319 Modify collection lock assertions on collection insert path
- Closed
-
SERVER-79320 Modify collection lock assertions for yield restore
- Closed
-
SERVER-79322 Modify collection lock assertion when creating random cursor executor
- Closed
-
SERVER-79323 Modify collection lock check in SBE plan executor
- Closed
-
SERVER-79343 Modify system.views locking assertion in shard role collection acquisition
- Closed
-
SERVER-79344 Modify collection lock assertion for dbHash
- Closed
-
SERVER-79345 Modify collection lock assertions in collection sharding runtime
- Closed
-
SERVER-79346 Modify collection lock assertion in collection sharding state
- Closed
-
SERVER-79347 Modify collection lock assertion in resharding op observer
- Closed
-
SERVER-79348 Modify collection lock assertion when looking up collection for metadata write
- Closed
- is depended on by
-
SERVER-79399 Remove ShouldNotConflictWithSecondaryBatchApplicationBlock and related functions
- Closed
- is duplicated by
-
SERVER-77474 LockerImpl::isCollectionLockedForMode always returns true in multi-document transactions
- Closed