diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2016-12-05 16:54:29 -0500 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2016-12-05 17:00:24 -0500 |
commit | 20ce1aa922673f758cc6c2edc47146c6314a4f57 (patch) | |
tree | 3ece6785ee81871af86f68bef3a86d4361c3d32b /src/mongo/db/sorter | |
parent | 25a351ee3225f3f957beb483d70382a19b7e2a0a (diff) | |
download | mongo-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/db/sorter')
-rw-r--r-- | src/mongo/db/sorter/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/db/sorter/sorter_test.cpp | 6 |
2 files changed, 1 insertions, 6 deletions
diff --git a/src/mongo/db/sorter/SConscript b/src/mongo/db/sorter/SConscript index 959f6cdb919..365c1a91f54 100644 --- a/src/mongo/db/sorter/SConscript +++ b/src/mongo/db/sorter/SConscript @@ -7,4 +7,5 @@ sorterEnv.CppUnitTest('sorter_test', LIBDEPS=['$BUILD_DIR/mongo/db/service_context', '$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger_customization_hooks', '$BUILD_DIR/mongo/db/storage/storage_options', + '$BUILD_DIR/mongo/s/is_mongos', '$BUILD_DIR/third_party/shim_snappy']) diff --git a/src/mongo/db/sorter/sorter_test.cpp b/src/mongo/db/sorter/sorter_test.cpp index 19171fb13ba..1bf02fdcbf3 100644 --- a/src/mongo/db/sorter/sorter_test.cpp +++ b/src/mongo/db/sorter/sorter_test.cpp @@ -52,12 +52,6 @@ using namespace mongo::sorter; using std::make_shared; using std::pair; -// Stub to avoid including the server_options library -// TODO: This should go away once we can do these checks at compile time -bool isMongos() { - return false; -} - // Stub to avoid including the server environment library. MONGO_INITIALIZER(SetGlobalEnvironment)(InitializerContext* context) { setGlobalServiceContext(stdx::make_unique<ServiceContextNoop>()); |