summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl
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-08 17:04:36 +0000
commit9573f636b18c3032e1bf548ae04afe4c6ffa0162 (patch)
tree0b1bd290e0759bda597961746f72ca0a54c81a21 /src/mongo/db/repl
parent9aa6c5bf7caf1488d81e009b1fbb89928136b0bb (diff)
downloadmongo-9573f636b18c3032e1bf548ae04afe4c6ffa0162.tar.gz
SERVER-47582 clearing the oplogTruncateAfterPoint during stepdown must not take the PBWM
(cherry picked from commit da4a8e0e85627d6febd8bce3fd87f221e0ff97c6)
Diffstat (limited to 'src/mongo/db/repl')
-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 d49f19f7c99..422d8f6d02d 100644
--- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
@@ -803,6 +803,10 @@ void ReplicationCoordinatorExternalStateImpl::stopAsyncUpdatesOfAndClearOplogTru
// above, if writing is imminent, so we must make sure that the code completes fully.
_service->getStorageEngine()->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());