summaryrefslogtreecommitdiff
path: root/src/mongo/s/server.cpp
diff options
context:
space:
mode:
authorADAM David Alan Martin <adam.martin@10gen.com>2016-12-05 16:54:29 -0500
committerADAM David Alan Martin <adam.martin@10gen.com>2016-12-05 17:00:24 -0500
commit20ce1aa922673f758cc6c2edc47146c6314a4f57 (patch)
tree3ece6785ee81871af86f68bef3a86d4361c3d32b /src/mongo/s/server.cpp
parent25a351ee3225f3f957beb483d70382a19b7e2a0a (diff)
downloadmongo-20ce1aa922673f758cc6c2edc47146c6314a4f57.tar.gz
SERVER-27211 de-duplicate symbol `isMongos`
A hidden global variable representing the "is Mongos process" state can now be accessed and updated by the `is_mongos.h` interface. All tests defining their own versions (and test crutches) are replaced with calls to global registration of the desired state of this variable. The `mongos` main executable now sets this hidden global state as part of its startup code.
Diffstat (limited to 'src/mongo/s/server.cpp')
-rw-r--r--src/mongo/s/server.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/s/server.cpp b/src/mongo/s/server.cpp
index 44569f4081a..2bad7e6063f 100644
--- a/src/mongo/s/server.cpp
+++ b/src/mongo/s/server.cpp
@@ -73,6 +73,7 @@
#include "mongo/s/commands/request.h"
#include "mongo/s/config.h"
#include "mongo/s/grid.h"
+#include "mongo/s/is_mongos.h"
#include "mongo/s/mongos_options.h"
#include "mongo/s/query/cluster_cursor_cleanup_job.h"
#include "mongo/s/query/cluster_cursor_manager.h"
@@ -435,6 +436,7 @@ MONGO_INITIALIZER_GENERAL(setSSLManagerType, MONGO_NO_PREREQUISITES, ("SSLManage
#endif
int mongoSMain(int argc, char* argv[], char** envp) {
+ mongo::setMongos();
static StaticObserver staticObserver;
if (argc < 1)
return EXIT_FAILURE;