diff options
author | Spencer T Brody <spencer@mongodb.com> | 2014-11-20 16:43:57 -0500 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2014-11-20 17:01:05 -0500 |
commit | 5d1f0d27992da53eb1c546f413e5b34e78d8c439 (patch) | |
tree | 623a33cea2d47d9a6f9834a277b5c31624621647 | |
parent | 5d53a26ce33320b5b91ff5a8fcd2b69be1367367 (diff) | |
download | mongo-5d1f0d27992da53eb1c546f413e5b34e78d8c439.tar.gz |
SERVER-15997 Register the ReplicationCoordinatorImpl as a killop listener
-rw-r--r-- | src/mongo/db/db.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp index 482bb0f716d..34d915bced6 100644 --- a/src/mongo/db/db.cpp +++ b/src/mongo/db/db.cpp @@ -775,12 +775,14 @@ MONGO_INITIALIZER_GENERAL(CreateAuthorizationManager, MONGO_INITIALIZER_WITH_PREREQUISITES(CreateReplicationManager, ("SetGlobalEnvironment")) (InitializerContext* context) { - repl::setGlobalReplicationCoordinator(new repl::ReplicationCoordinatorImpl( + repl::ReplicationCoordinatorImpl* replCoord = new repl::ReplicationCoordinatorImpl( getGlobalReplSettings(), new repl::ReplicationCoordinatorExternalStateImpl, new repl::NetworkInterfaceImpl, new repl::TopologyCoordinatorImpl(Seconds(repl::maxSyncSourceLagSecs)), - static_cast<int64_t>(curTimeMillis64()))); + static_cast<int64_t>(curTimeMillis64())); + repl::setGlobalReplicationCoordinator(replCoord); + getGlobalEnvironment()->registerKillOpListener(replCoord); return Status::OK(); } |