summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Russotto <matthew.russotto@mongodb.com>2021-06-23 16:50:06 -0400
committerMatthew Russotto <matthew.russotto@mongodb.com>2021-06-25 19:15:37 -0400
commit927d7919f2537c9270953f944a15d2a013332702 (patch)
tree66d4426e46df2779e94a32f72971776020c98f3a
parent19097bea3851d73a005436f31ecdf771a825a8cb (diff)
downloadmongo-927d7919f2537c9270953f944a15d2a013332702.tar.gz
Revert "SERVER-56963 Prevent secondaries from waiting for write concern when they've taken write locks"
This reverts commit 23c40392fd939334752d2b20a75e77e89517feea.
-rw-r--r--src/mongo/db/service_entry_point_mongod.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/mongo/db/service_entry_point_mongod.cpp b/src/mongo/db/service_entry_point_mongod.cpp
index b2b7fa48944..00fbaea5764 100644
--- a/src/mongo/db/service_entry_point_mongod.cpp
+++ b/src/mongo/db/service_entry_point_mongod.cpp
@@ -137,16 +137,6 @@ public:
// wait for write concern on operations the transaction observed.
if (opCtx->lockState()->wasGlobalLockTakenForWrite() &&
!opCtx->inMultiDocumentTransaction()) {
-
- // Recently stepped down nodes will receive the proper error message because the
- // rstlKillOpThread would have already interrupted this thread since it took a lock for
- // a write. We should allow standalone nodes to wait for write concern since they might
- // be waiting for journaling.
- auto replCoord = repl::ReplicationCoordinator::get(opCtx);
- if (!replCoord->canAcceptNonLocalWrites() && replCoord->isReplEnabled()) {
- return;
- }
-
repl::ReplClientInfo::forClient(opCtx->getClient()).setLastOpToSystemLastOpTime(opCtx);
lastOpAfterRun = repl::ReplClientInfo::forClient(opCtx->getClient()).getLastOp();
waitForWriteConcernAndAppendStatus();