Details
-
Task
-
Status: Backlog
-
Major - P3
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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
Attachments
Issue Links
- is related to
-
SERVER-38341 Remove Parallel Batch Writer Mutex
-
- Backlog
-
- related to
-
SERVER-53846 Clarify locking requirements in createCollectionForApplyOps
-
- Open
-