diff options
author | Matthew Russotto <matthew.russotto@10gen.com> | 2019-02-04 17:57:00 -0500 |
---|---|---|
committer | Matthew Russotto <matthew.russotto@10gen.com> | 2019-02-12 11:07:46 -0500 |
commit | c3a72d61dc8ab4aa32fae400c74b06360a572537 (patch) | |
tree | 644f7b08bafd1e3d8e0a7ca856093c50c97ed3ff /src/mongo/db | |
parent | 530a26bc5387de3dd131a18801a6c3253c4f3220 (diff) | |
download | mongo-c3a72d61dc8ab4aa32fae400c74b06360a572537.tar.gz |
SERVER-38516 Remove “closeConnectionsOnStepdown” flag and fix tests broken by this
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp index 3becf53450a..0c717af02bf 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl.cpp @@ -98,8 +98,6 @@ MONGO_FAIL_POINT_DEFINE(stepdownHangBeforePerformingPostMemberStateUpdateActions MONGO_FAIL_POINT_DEFINE(transitionToPrimaryHangBeforeTakingGlobalExclusiveLock); MONGO_FAIL_POINT_DEFINE(holdStableTimestampAtSpecificTimestamp); -MONGO_EXPORT_SERVER_PARAMETER(closeConnectionsOnStepdown, bool, true); - using CallbackArgs = executor::TaskExecutor::CallbackArgs; using CallbackFn = executor::TaskExecutor::CallbackFn; using CallbackHandle = executor::TaskExecutor::CallbackHandle; @@ -1770,7 +1768,7 @@ void ReplicationCoordinatorImpl::_killUserOperationsOnStepDown( if (toKill && toKill->getOpID() != stepDownOpCtx->getOpID()) { const GlobalLockAcquisitionTracker& globalLockTracker = GlobalLockAcquisitionTracker::get(toKill); - if (closeConnectionsOnStepdown.load() || globalLockTracker.getGlobalWriteLocked() || + if (globalLockTracker.getGlobalWriteLocked() || globalLockTracker.getGlobalSharedLockTaken()) { serviceCtx->killOperation(lk, toKill, ErrorCodes::InterruptedDueToStepDown); } @@ -2810,9 +2808,6 @@ void ReplicationCoordinatorImpl::_performPostMemberStateUpdateAction( _externalState->closeConnections(); /* FALLTHROUGH */ case kActionSteppedDown: - if (closeConnectionsOnStepdown.load()) { - _externalState->closeConnections(); - } _externalState->shardingOnStepDownHook(); _externalState->stopNoopWriter(); break; |