Details
-
Task
-
Status: Backlog
-
Major - P3
-
Resolution: Unresolved
-
None
-
None
-
Storage Execution
Description
Currently here is my understanding of the PBWM:
- Primaries take it in IS for all reads and writes. This is unnecessary because it will never conflict with anything
- Secondaries take it in X around a batch
- Secondary oplog appliers don't take it at all
- Snapshot secondary readers never take it
- Secondary readers only take it in IS if there is no lastApplied to read from
The lock is only really used to serialize the second and fifth bullets above. It should be fairly straightforward to always have a lastApplied value to read from on secondaries. This extra lock adds a lot of code complexity with very little value and is high value code cleanup.
Attachments
Issue Links
- depends on
-
SERVER-47866 Secondary readers do not need to reacquire PBWM lock if there are catalog conflicts
-
- Closed
-
-
SERVER-50970 Support secondary reads in ephemeralForTest
-
- Closed
-
- is depended on by
-
SERVER-41010 getMinValid() in bgsync shouldn't conflict with PBWM lock
-
- Backlog
-
- is related to
-
SERVER-44105 Perform ShardServerCatalogLoader writes in a single transaction
-
- Closed
-
-
SERVER-48518 Rollback via refetch (EMRC = false) can make readers to see the rolled back data even after the rollback node catches up to primary.
-
- Closed
-
-
SERVER-48398 Writing config document to "local.system.replset" should not acquire PBWM lock.
-
- Backlog
-
-
SERVER-48399 Writing config document to "local.system.replset" should not acquire database lock in stronger mode (X).
-
- Backlog
-
-
SERVER-26006 Audit all background tasks and decide which should conflict with replication application
-
- Closed
-
- related to
-
SERVER-44821 retrieving storage stats for currentOp blocked by slow oplog application
-
- Closed
-
-
SERVER-44859 plan_cache_index_create.js is blocked on two phase index build commit
-
- Closed
-
-
SERVER-44943 avoid taking the PBWM lock in ReplicationCoordinatorExternalStateImpl::oplogExists()
-
- Closed
-
-
SERVER-44944 avoid taking the PBWM lock in SessionsCollectionRS::_isStandaloneOrPrimary()
-
- Closed
-
-
SERVER-45007 PBWM acquisition in GlobalLock constructor ignores deadline
-
- Closed
-
-
SERVER-41407 Create a test suite that does secondary reads and also kills secondaries
-
- Backlog
-
-
SERVER-53817 Remove check for shouldConflictWithSecondaryBatchApplication() in isCollectionLockedForMode()
-
- Backlog
-