diff options
author | Spencer T Brody <spencer@mongodb.com> | 2014-07-08 16:56:30 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2014-07-09 11:54:38 -0400 |
commit | 80f039c34373228fd7720ab3782cf1755397116d (patch) | |
tree | ca04a93dfbff1ba847a6bbcb9a688d42cc0b71f6 /src/mongo/db/restapi.cpp | |
parent | 0239597c2a2f1689a2969acd9b776dad3582ac7e (diff) | |
download | mongo-80f039c34373228fd7720ab3782cf1755397116d.tar.gz |
SERVER-14420 Get rid of global replSettings object
Diffstat (limited to 'src/mongo/db/restapi.cpp')
-rw-r--r-- | src/mongo/db/restapi.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/restapi.cpp b/src/mongo/db/restapi.cpp index 4b3975491b6..cd6619d2d06 100644 --- a/src/mongo/db/restapi.cpp +++ b/src/mongo/db/restapi.cpp @@ -42,7 +42,6 @@ #include "mongo/db/dbwebserver.h" #include "mongo/db/instance.h" #include "mongo/db/repl/master_slave.h" -#include "mongo/db/repl/repl_settings.h" #include "mongo/db/repl/repl_coordinator_global.h" #include "mongo/util/md5.hpp" #include "mongo/util/mongoutils/html.h" @@ -277,6 +276,8 @@ namespace mongo { virtual void init() {} void _gotLock( int millis , stringstream& ss ) { + const repl::ReplSettings& replSettings = + repl::getGlobalReplicationCoordinator()->getSettings(); ss << "<pre>\n"; ss << "time to get readlock: " << millis << "ms\n"; ss << "# Cursors: " << ClientCursor::totalOpen() << '\n'; @@ -286,13 +287,13 @@ namespace mongo { if (repl::getGlobalReplicationCoordinator()->getReplicationMode() == repl::ReplicationCoordinator::modeReplSet) { ss << a("", "see replSetGetStatus link top of page") << "--replSet </a>" - << repl::replSettings.replSet; + << replSettings.replSet; } if (repl::replAllDead) ss << "\n<b>replication replAllDead=" << repl::replAllDead << "</b>\n"; else { - ss << "\nmaster: " << repl::replSettings.master << '\n'; - ss << "slave: " << repl::replSettings.slave << '\n'; + ss << "\nmaster: " << replSettings.master << '\n'; + ss << "slave: " << replSettings.slave << '\n'; ss << '\n'; } |