summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp
diff options
context:
space:
mode:
authorWenbin Zhu <wenbin.zhu@mongodb.com>2021-07-07 18:00:05 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-07-07 18:35:59 +0000
commit8588a5a3a52f17026b1e5a21c00e815fbb702a7c (patch)
tree50c045d450a8fc906970495ddc82ec5003f091ea /src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp
parent9b5b72f9d9469bb4df202266675e222402481a4d (diff)
downloadmongo-8588a5a3a52f17026b1e5a21c00e815fbb702a7c.tar.gz
SERVER-57756 Remove ScopedBlockSessionCheckouts which is now unnecessary and causing race with concurrent stepdowns.
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp')
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp b/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp
index e50565e5c40..4880a926d4f 100644
--- a/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp
@@ -57,7 +57,6 @@
#include "mongo/db/repl/topology_coordinator.h"
#include "mongo/db/repl/vote_requester.h"
#include "mongo/db/service_context.h"
-#include "mongo/db/session_catalog.h"
#include "mongo/db/storage/control/journal_flusher.h"
#include "mongo/logv2/log.h"
#include "mongo/platform/mutex.h"
@@ -525,11 +524,6 @@ void ReplicationCoordinatorImpl::_stepDownFinish(
auto opCtx = cc().makeOperationContext();
- // To prevent a deadlock between session checkout and RSTL lock taking, disallow new sessions
- // from being checked out. Existing sessions currently checked out will be killed by the
- // killOpThread.
- ScopedBlockSessionCheckouts blockSessions(opCtx.get());
-
// kill all write operations which are no longer safe to run on step down. Also, operations that
// have taken global lock in S mode and operations blocked on prepare conflict will be killed to
// avoid 3-way deadlock between read, prepared transaction and step down thread.
@@ -811,11 +805,6 @@ void ReplicationCoordinatorImpl::_heartbeatReconfigFinish(
_topCoord->prepareForUnconditionalStepDown();
lk.unlock();
- // To prevent a deadlock between session checkout and RSTL lock taking, disallow new
- // sessions from being checked out. Existing sessions currently checked out will be killed
- // by the killOpThread.
- ScopedBlockSessionCheckouts blockSessions(opCtx.get());
-
// Primary node will be either unelectable or removed after the configuration change.
// So, finish the reconfig under RSTL, so that the step down occurs safely.
arsd.emplace(