summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDianna Hohensee <dianna.hohensee@mongodb.com>2020-04-30 12:52:44 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-06 13:24:38 +0000
commitda4a8e0e85627d6febd8bce3fd87f221e0ff97c6 (patch)
tree1acabbff065b4995ef8168ed464fefa089c2a07c
parent74ea6aa4dfd7b3b4acf090084d36891834a49385 (diff)
downloadmongo-da4a8e0e85627d6febd8bce3fd87f221e0ff97c6.tar.gz
SERVER-47582 clearing the oplogTruncateAfterPoint during stepdown must not take the PBWM
-rw-r--r--src/mongo/db/repl/replication_coordinator_external_state_impl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
index c8b740275ad..603d111e5a3 100644
--- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
@@ -805,6 +805,10 @@ void ReplicationCoordinatorExternalStateImpl::_stopAsyncUpdatesOfAndClearOplogTr
// above, if writing is imminent, so we must make sure that the code completes fully.
StorageControl::waitForJournalFlush(opCtx);
+ // Writes to non-replicated collections do not need concurrency control with the OplogApplier
+ // that never accesses them. Skip taking the PBWM.
+ ShouldNotConflictWithSecondaryBatchApplicationBlock shouldNotConflictBlock(opCtx->lockState());
+
// We can clear the oplogTruncateAfterPoint because we know there are no user writes during
// stepdown and therefore presently no oplog holes.
_replicationProcess->getConsistencyMarkers()->setOplogTruncateAfterPoint(opCtx, Timestamp());