diff options
-rw-r--r-- | src/mongo/SConscript | 6 | ||||
-rw-r--r-- | src/mongo/client/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/db/SConscript | 66 | ||||
-rw-r--r-- | src/mongo/db/auth/SConscript | 2 | ||||
-rw-r--r-- | src/mongo/db/commands.cpp | 39 | ||||
-rw-r--r-- | src/mongo/db/commands.h | 6 | ||||
-rw-r--r-- | src/mongo/db/commands/SConscript | 69 | ||||
-rw-r--r-- | src/mongo/db/commands/conn_pool_sync.cpp | 73 | ||||
-rw-r--r-- | src/mongo/db/commands/generic.cpp (renamed from src/mongo/db/dbcommands_generic.cpp) | 2 | ||||
-rw-r--r-- | src/mongo/db/exec/SConscript | 3 | ||||
-rw-r--r-- | src/mongo/db/ftdc/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/db/query/SConscript | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/SConscript | 28 | ||||
-rw-r--r-- | src/mongo/db/s/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/db/storage/mmap_v1/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/db/storage/wiredtiger/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/dbtests/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/executor/SConscript | 2 | ||||
-rw-r--r-- | src/mongo/s/SConscript | 3 | ||||
-rw-r--r-- | src/mongo/s/client/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/s/commands/SConscript | 2 | ||||
-rw-r--r-- | src/mongo/s/query/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/util/SConscript | 5 |
23 files changed, 191 insertions, 125 deletions
diff --git a/src/mongo/SConscript b/src/mongo/SConscript index b7eba84468f..340d270cbfa 100644 --- a/src/mongo/SConscript +++ b/src/mongo/SConscript @@ -237,7 +237,7 @@ generateConfigHeaderFile = env.Substfile( env.Alias('generated-sources', generateConfigHeaderFile) mongodLibDeps = [ - "db/coredb", + "db/commands/core", "db/conn_pool_options", "db/mongod_options", "db/mongodandmongos", @@ -275,7 +275,6 @@ env.Install( "client/examples/mongoperf.cpp", ], LIBDEPS=[ - "db/coredb", "db/serveronly", "util/ntservice_mock", ]), @@ -293,7 +292,7 @@ env.Install( ], LIBDEPS=[ 'db/conn_pool_options', - 'db/coredb', + 'db/commands/core', 'db/mongodandmongos', 's/client/sharding_connection_hook', 's/commands/cluster_commands', @@ -325,7 +324,6 @@ if env.TargetOSIs('osx') or env["_HAVEPCAP"]: sniffEnv.Install( '#/', sniffEnv.Program( "mongosniff", "tools/sniffer.cpp", LIBDEPS = [ "db/serveronly", - "db/coredb", ] ) ) # --- shell --- diff --git a/src/mongo/client/SConscript b/src/mongo/client/SConscript index ca130091830..22b3c80d083 100644 --- a/src/mongo/client/SConscript +++ b/src/mongo/client/SConscript @@ -228,7 +228,6 @@ env.CppUnitTest( 'scoped_db_conn_test.cpp', ], LIBDEPS=[ - '$BUILD_DIR/mongo/db/coredb', '$BUILD_DIR/mongo/db/auth/authorization_manager_mock_init', '$BUILD_DIR/mongo/util/net/message_server_port', '$BUILD_DIR/mongo/s/coreshard', diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript index 6ed5b26d85f..8b9d7a7854f 100644 --- a/src/mongo/db/SConscript +++ b/src/mongo/db/SConscript @@ -392,7 +392,6 @@ env.Library( LIBDEPS=[ "$BUILD_DIR/mongo/client/clientdriver", "$BUILD_DIR/mongo/db/auth/authservercommon", - "$BUILD_DIR/mongo/db/coredb", "$BUILD_DIR/mongo/rpc/command_reply", "$BUILD_DIR/mongo/rpc/command_request", "$BUILD_DIR/mongo/rpc/metadata", @@ -417,7 +416,6 @@ env.Library( "repl/replset_web_handler.cpp", ], LIBDEPS=[ - "$BUILD_DIR/mongo/db/coredb", "$BUILD_DIR/mongo/db/curop", "$BUILD_DIR/mongo/util/net/miniwebserver", "mongodandmongos", @@ -436,7 +434,6 @@ env.Library( "mongod_options.cpp", ], LIBDEPS=[ - '$BUILD_DIR/mongo/db/coredb', '$BUILD_DIR/mongo/db/serveronly', '$BUILD_DIR/mongo/util/options_parser/options_parser_init', 'server_options', @@ -474,70 +471,37 @@ env.Library( target="audit", source=[ "audit.cpp", - ]) + ], + LIBDEPS=[ + ], +) env.Library( - target="coredb", - source=[ - "commands.cpp", - "commands/authentication_commands.cpp", - "commands/conn_pool_stats.cpp", - "commands/connection_status.cpp", - "commands/copydb_common.cpp", - "commands/fail_point_cmd.cpp", - "commands/find_and_modify_common.cpp", - "commands/hashcmd.cpp", - "commands/isself.cpp", - "repl/isself.cpp", - "commands/mr_common.cpp", - "commands/rename_collection_common.cpp", - "commands/server_status.cpp", - "commands/parameters.cpp", - "commands/user_management_commands_common.cpp", - "commands/write_commands/write_commands_common.cpp", - "dbcommands_generic.cpp", + target="commands", + source=[ + 'commands.cpp', ], LIBDEPS=[ - '$BUILD_DIR/mongo/client/clientdriver', - '$BUILD_DIR/mongo/db/commands/test_commands_enabled', - '$BUILD_DIR/mongo/db/repl/repl_coordinator_global', - '$BUILD_DIR/mongo/logger/parse_log_component_settings', - '$BUILD_DIR/mongo/scripting/scripting_common', - '$BUILD_DIR/mongo/util/cmdline_utils/cmdline_utils', - '$BUILD_DIR/mongo/util/foundation', - '$BUILD_DIR/mongo/util/processinfo', - '$BUILD_DIR/mongo/s/client/sharding_client', + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/mongo/bson/mutable/mutable_bson', + '$BUILD_DIR/mongo/db/auth/authcore', + '$BUILD_DIR/mongo/rpc/command_status', + '$BUILD_DIR/mongo/rpc/rpc', '$BUILD_DIR/mongo/s/write_ops/batch_write_types', 'audit', - 'auth/authcommon', 'auth/authorization_manager_global', - 'auth/serverauth', 'commands/server_status_core', - 'common', + 'commands/test_commands_enabled', 'curop', - 'exec/working_set', - 'index/key_generator', - 'index_names', - 'log_process_details', - 'lasterror', - 'matcher/expressions', - 'matcher/expressions_geo', - 'matcher/expressions_text', - 'server_options', - 'server_parameters', - 'startup_warnings_common', - 'stats/counters', - 'stats/timer_stats', + 'service_context', ], LIBDEPS_TAGS=[ # Dependencies on Command::registerError and - # Command::execCommand, which are not uniquely defined. Also - # depends on mongo::exitCleanly. + # Command::execCommand, which are not uniquely defined. 'incomplete', ], ) - # mongod files - also files used in tools. present in dbtests, but not in mongos and not in client # libs. serverOnlyFiles = [ diff --git a/src/mongo/db/auth/SConscript b/src/mongo/db/auth/SConscript index 7056725bee2..f8935e8d588 100644 --- a/src/mongo/db/auth/SConscript +++ b/src/mongo/db/auth/SConscript @@ -76,7 +76,7 @@ env.Library('authservercommon', 'security_key.cpp', ], LIBDEPS=[ - '$BUILD_DIR/mongo/db/coredb', + '$BUILD_DIR/mongo/db/commands/core', 'authcommon', 'authcore', 'authmocks', diff --git a/src/mongo/db/commands.cpp b/src/mongo/db/commands.cpp index bd3d95e7295..05f77c86615 100644 --- a/src/mongo/db/commands.cpp +++ b/src/mongo/db/commands.cpp @@ -38,10 +38,7 @@ #include <string> #include <vector> -#include "mongo/bson/bsonobjbuilder.h" #include "mongo/bson/mutable/document.h" -#include "mongo/client/connpool.h" -#include "mongo/client/global_conn_pool.h" #include "mongo/db/audit.h" #include "mongo/db/auth/action_set.h" #include "mongo/db/auth/action_type.h" @@ -55,7 +52,6 @@ #include "mongo/db/server_parameters.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/rpc/metadata.h" -#include "mongo/s/client/shard_connection.h" #include "mongo/s/stale_exception.h" #include "mongo/s/write_ops/wc_error_detail.h" #include "mongo/util/log.h" @@ -81,6 +77,8 @@ ExportedServerParameter<bool, ServerParameterType::kStartupOnly> testCommandsPar ServerParameterSet::getGlobal(), "enableTestCommands", &Command::testCommandsEnabled); } +Command::~Command() = default; + string Command::parseNsFullyQualified(const string& dbname, const BSONObj& cmdObj) const { BSONElement first = cmdObj.firstElement(); uassert(17005, @@ -503,37 +501,4 @@ void runCommands(OperationContext* txn, } } -class PoolFlushCmd : public Command { -public: - PoolFlushCmd() : Command("connPoolSync", false, "connpoolsync") {} - virtual void help(stringstream& help) const { - help << "internal"; - } - virtual bool isWriteCommandForConfigServer() const { - return false; - } - virtual void addRequiredPrivileges(const std::string& dbname, - const BSONObj& cmdObj, - std::vector<Privilege>* out) { - ActionSet actions; - actions.addAction(ActionType::connPoolSync); - out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); - } - - virtual bool run(OperationContext* txn, - const string&, - mongo::BSONObj&, - int, - std::string&, - mongo::BSONObjBuilder& result) { - shardConnectionPool.flush(); - globalConnPool.flush(); - return true; - } - virtual bool slaveOk() const { - return true; - } - -} poolFlushCmd; - } // namespace mongo diff --git a/src/mongo/db/commands.h b/src/mongo/db/commands.h index 760854f7d66..f2daf4fe5b4 100644 --- a/src/mongo/db/commands.h +++ b/src/mongo/db/commands.h @@ -79,6 +79,10 @@ protected: public: typedef StringMap<Command*> CommandMap; + // NOTE: Do not remove this declaration, or relocate it in this class. We + // are using this method to control where the vtable is emitted. + virtual ~Command(); + // Return the namespace for the command. If the first field in 'cmdObj' is of type // mongo::String, then that field is interpreted as the collection name, and is // appended to 'dbname' after a '.' character. If the first field is not of type @@ -250,8 +254,6 @@ public: */ Command(StringData _name, bool webUI = false, StringData oldName = StringData()); - virtual ~Command() {} - protected: /** * Appends to "*out" the privileges required to run this command on database "dbname" with diff --git a/src/mongo/db/commands/SConscript b/src/mongo/db/commands/SConscript index 625e922bb79..133e2147427 100644 --- a/src/mongo/db/commands/SConscript +++ b/src/mongo/db/commands/SConscript @@ -22,12 +22,76 @@ env.Library( ) env.Library( + target="core", + source=[ + "authentication_commands.cpp", + "conn_pool_stats.cpp", + "conn_pool_sync.cpp", + "connection_status.cpp", + "copydb_common.cpp", + "fail_point_cmd.cpp", + "find_and_modify_common.cpp", + "hashcmd.cpp", + "isself.cpp", + "mr_common.cpp", + "rename_collection_common.cpp", + "server_status.cpp", + "parameters.cpp", + "user_management_commands_common.cpp", + "write_commands/write_commands_common.cpp", + "generic.cpp", + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/client/clientdriver', + '$BUILD_DIR/mongo/db/audit', + '$BUILD_DIR/mongo/db/auth/authcommon', + '$BUILD_DIR/mongo/db/auth/authorization_manager_global', + '$BUILD_DIR/mongo/db/auth/serverauth', + '$BUILD_DIR/mongo/db/commands', + '$BUILD_DIR/mongo/db/commands/test_commands_enabled', + '$BUILD_DIR/mongo/db/common', + '$BUILD_DIR/mongo/db/curop', + '$BUILD_DIR/mongo/db/exec/working_set', + '$BUILD_DIR/mongo/db/index/key_generator', + '$BUILD_DIR/mongo/db/index_names', + '$BUILD_DIR/mongo/db/lasterror', + '$BUILD_DIR/mongo/db/log_process_details', + '$BUILD_DIR/mongo/db/matcher/expressions', + '$BUILD_DIR/mongo/db/matcher/expressions_geo', + '$BUILD_DIR/mongo/db/matcher/expressions_text', + '$BUILD_DIR/mongo/db/repl/isself', + '$BUILD_DIR/mongo/db/repl/repl_coordinator_global', + '$BUILD_DIR/mongo/db/server_options', + '$BUILD_DIR/mongo/db/server_parameters', + '$BUILD_DIR/mongo/db/startup_warnings_common', + '$BUILD_DIR/mongo/db/stats/counters', + '$BUILD_DIR/mongo/db/stats/timer_stats', + '$BUILD_DIR/mongo/logger/parse_log_component_settings', + '$BUILD_DIR/mongo/s/client/sharding_client', + '$BUILD_DIR/mongo/s/write_ops/batch_write_types', + '$BUILD_DIR/mongo/scripting/scripting_common', + '$BUILD_DIR/mongo/util/cmdline_utils/cmdline_utils', + '$BUILD_DIR/mongo/util/foundation', + '$BUILD_DIR/mongo/util/processinfo', + 'server_status_core', + ], + LIBDEPS_TAGS=[ + # Depends on mongo::exitCleanly. + 'incomplete', + ], +) + + + +env.Library( target='killcursors_common', source=[ 'killcursors_common.cpp', ], LIBDEPS=[ - "$BUILD_DIR/mongo/db/coredb", + '$BUILD_DIR/mongo/db/audit', + '$BUILD_DIR/mongo/db/commands', + '$BUILD_DIR/mongo/db/auth/authorization_manager_global', '$BUILD_DIR/mongo/db/query/command_request_response', ], ) @@ -38,7 +102,6 @@ env.CppUnitTest( "index_filter_commands_test.cpp", ], LIBDEPS=[ - "$BUILD_DIR/mongo/db/coredb", "$BUILD_DIR/mongo/db/serveronly", "$BUILD_DIR/mongo/util/ntservice_mock", ], @@ -51,7 +114,6 @@ env.CppUnitTest( "mr_test.cpp", ], LIBDEPS=[ - "$BUILD_DIR/mongo/db/coredb", "$BUILD_DIR/mongo/db/serveronly", "$BUILD_DIR/mongo/util/ntservice_mock", ], @@ -64,7 +126,6 @@ env.CppUnitTest( "plan_cache_commands_test.cpp", ], LIBDEPS=[ - "$BUILD_DIR/mongo/db/coredb", "$BUILD_DIR/mongo/db/serveronly", "$BUILD_DIR/mongo/util/ntservice_mock", ], diff --git a/src/mongo/db/commands/conn_pool_sync.cpp b/src/mongo/db/commands/conn_pool_sync.cpp new file mode 100644 index 00000000000..e84c418761b --- /dev/null +++ b/src/mongo/db/commands/conn_pool_sync.cpp @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2015 MongoDB Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * As a special exception, the copyright holders give permission to link the + * code of portions of this program with the OpenSSL library under certain + * conditions as described in each individual source file and distribute + * linked combinations including the program with the OpenSSL library. You + * must comply with the GNU Affero General Public License in all respects for + * all of the code used other than as permitted herein. If you modify file(s) + * with this exception, you may extend this exception to your version of the + * file(s), but you are not obligated to do so. If you do not wish to do so, + * delete this exception statement from your version. If you delete this + * exception statement from all source files in the program, then also delete + * it in the license file. + */ + +#include "mongo/platform/basic.h" + +#include <sstream> + +#include "mongo/client/connpool.h" +#include "mongo/client/global_conn_pool.h" +#include "mongo/db/commands.h" +#include "mongo/s/client/shard_connection.h" + +namespace mongo { + +class PoolFlushCmd : public Command { +public: + PoolFlushCmd() : Command("connPoolSync", false, "connpoolsync") {} + virtual void help(std::stringstream& help) const { + help << "internal"; + } + virtual bool isWriteCommandForConfigServer() const { + return false; + } + virtual void addRequiredPrivileges(const std::string& dbname, + const BSONObj& cmdObj, + std::vector<Privilege>* out) { + ActionSet actions; + actions.addAction(ActionType::connPoolSync); + out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); + } + + virtual bool run(OperationContext* txn, + const std::string&, + mongo::BSONObj&, + int, + std::string&, + mongo::BSONObjBuilder& result) { + shardConnectionPool.flush(); + globalConnPool.flush(); + return true; + } + virtual bool slaveOk() const { + return true; + } + +} poolFlushCmd; + +} // namespace mongo diff --git a/src/mongo/db/dbcommands_generic.cpp b/src/mongo/db/commands/generic.cpp index 4895f51e27f..47f47442452 100644 --- a/src/mongo/db/dbcommands_generic.cpp +++ b/src/mongo/db/commands/generic.cpp @@ -1,5 +1,3 @@ -/** @file dbcommands_generic.cpp commands suited for any mongo server (both mongod, mongos) */ - /** * Copyright (C) 2012 10gen Inc. * diff --git a/src/mongo/db/exec/SConscript b/src/mongo/db/exec/SConscript index a501a19d56b..bc4db81ddaa 100644 --- a/src/mongo/db/exec/SConscript +++ b/src/mongo/db/exec/SConscript @@ -97,7 +97,6 @@ env.CppUnitTest( LIBDEPS = [ "exec", "$BUILD_DIR/mongo/db/serveronly", - "$BUILD_DIR/mongo/db/coredb", "$BUILD_DIR/mongo/dbtests/mocklib", "$BUILD_DIR/mongo/util/ntservice_mock", ], @@ -112,7 +111,6 @@ env.CppUnitTest( LIBDEPS = [ "exec", "$BUILD_DIR/mongo/db/serveronly", - "$BUILD_DIR/mongo/db/coredb", "$BUILD_DIR/mongo/dbtests/mocklib", "$BUILD_DIR/mongo/util/ntservice_mock", ], @@ -127,7 +125,6 @@ env.CppUnitTest( LIBDEPS = [ "exec", "$BUILD_DIR/mongo/db/serveronly", - "$BUILD_DIR/mongo/db/coredb", "$BUILD_DIR/mongo/util/ntservice_mock", ], NO_CRUTCH = True, diff --git a/src/mongo/db/ftdc/SConscript b/src/mongo/db/ftdc/SConscript index d5a4c6262a0..1527dbdd5f9 100644 --- a/src/mongo/db/ftdc/SConscript +++ b/src/mongo/db/ftdc/SConscript @@ -38,7 +38,6 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/coredb', '$BUILD_DIR/mongo/db/server_parameters', 'ftdc' ], diff --git a/src/mongo/db/query/SConscript b/src/mongo/db/query/SConscript index f4a9a1c7b02..18e821b49b1 100644 --- a/src/mongo/db/query/SConscript +++ b/src/mongo/db/query/SConscript @@ -83,7 +83,6 @@ env.CppUnitTest( LIBDEPS=[ "query", "$BUILD_DIR/mongo/db/serveronly", - "$BUILD_DIR/mongo/db/coredb", "$BUILD_DIR/mongo/dbtests/mocklib", "$BUILD_DIR/mongo/util/ntservice_mock", ], @@ -352,7 +351,6 @@ env.CppUnitTest( "query", "query_planner_test_fixture", "$BUILD_DIR/mongo/db/serveronly", - "$BUILD_DIR/mongo/db/coredb", "$BUILD_DIR/mongo/dbtests/mocklib", "$BUILD_DIR/mongo/util/ntservice_mock", ], diff --git a/src/mongo/db/repl/SConscript b/src/mongo/db/repl/SConscript index e6e451dc8aa..4fab475d306 100644 --- a/src/mongo/db/repl/SConscript +++ b/src/mongo/db/repl/SConscript @@ -154,6 +154,21 @@ env.Library( ] ) +env.Library( + target="isself", + source=[ + 'isself.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/mongo/client/clientdriver', + '$BUILD_DIR/mongo/db/auth/authcore', + '$BUILD_DIR/mongo/db/auth/authorization_manager_global', + '$BUILD_DIR/mongo/util/net/hostandport', + '$BUILD_DIR/mongo/util/net/network', + ], +) + env.CppUnitTest( target='rs_rollback_test', source=[ @@ -163,7 +178,6 @@ env.CppUnitTest( 'oplog_interface_mock', 'replmocks', 'rs_rollback', - '$BUILD_DIR/mongo/db/coredb', '$BUILD_DIR/mongo/db/serveronly', '$BUILD_DIR/mongo/util/ntservice_mock', ], @@ -214,7 +228,6 @@ env.CppUnitTest( LIBDEPS=[ 'replmocks', 'sync_tail', - '$BUILD_DIR/mongo/db/coredb', '$BUILD_DIR/mongo/db/serveronly', '$BUILD_DIR/mongo/util/ntservice_mock', ], @@ -252,12 +265,16 @@ env.CppUnitTest('repl_set_heartbeat_response_test', env.CppUnitTest('topology_coordinator_impl_test', 'topology_coordinator_impl_test.cpp', LIBDEPS=['topology_coordinator_impl', - 'replica_set_messages']) + 'replica_set_messages', + '$BUILD_DIR/mongo/db/auth/authorization_manager_mock_init', + ]) env.CppUnitTest('topology_coordinator_impl_v1_test', 'topology_coordinator_impl_v1_test.cpp', LIBDEPS=['topology_coordinator_impl', - 'replica_set_messages']) + 'replica_set_messages', + '$BUILD_DIR/mongo/db/auth/authorization_manager_mock_init', + ]) env.Library('repl_coordinator_impl', [ @@ -298,6 +315,7 @@ env.Library('repl_coordinator_test_fixture', ], LIBDEPS=[ '$BUILD_DIR/mongo/unittest/unittest', + '$BUILD_DIR/mongo/db/auth/authorization_manager_mock_init', 'repl_coordinator_impl', 'replmocks', 'topology_coordinator_impl',\ @@ -461,7 +479,6 @@ env.CppUnitTest('isself_test', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/serveronly', - '$BUILD_DIR/mongo/db/coredb', "$BUILD_DIR/mongo/util/ntservice_mock", ], NO_CRUTCH = True) @@ -477,7 +494,6 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/concurrency/lock_manager', - '$BUILD_DIR/mongo/db/coredb', '$BUILD_DIR/mongo/db/repl/repl_coordinator_global', 'replica_set_messages', ], diff --git a/src/mongo/db/s/SConscript b/src/mongo/db/s/SConscript index 59ff7c88904..d752c9fed0a 100644 --- a/src/mongo/db/s/SConscript +++ b/src/mongo/db/s/SConscript @@ -71,7 +71,6 @@ env.CppUnitTest( 'metadata', '$BUILD_DIR/mongo/db/auth/authorization_manager_mock_init', '$BUILD_DIR/mongo/db/common', - '$BUILD_DIR/mongo/db/coredb', '$BUILD_DIR/mongo/dbtests/mocklib', '$BUILD_DIR/mongo/s/catalog/legacy/catalog_manager_legacy', '$BUILD_DIR/mongo/s/coreshard', diff --git a/src/mongo/db/storage/mmap_v1/SConscript b/src/mongo/db/storage/mmap_v1/SConscript index c97940318af..42832eb115a 100644 --- a/src/mongo/db/storage/mmap_v1/SConscript +++ b/src/mongo/db/storage/mmap_v1/SConscript @@ -153,7 +153,6 @@ env.CppUnitTest( ], LIBDEPS=[ '$BUILD_DIR/mongo/db/serveronly', - '$BUILD_DIR/mongo/db/coredb', '$BUILD_DIR/mongo/util/ntservice_mock', ], NO_CRUTCH=True, diff --git a/src/mongo/db/storage/wiredtiger/SConscript b/src/mongo/db/storage/wiredtiger/SConscript index ce56598da87..e79d41f16e6 100644 --- a/src/mongo/db/storage/wiredtiger/SConscript +++ b/src/mongo/db/storage/wiredtiger/SConscript @@ -102,7 +102,6 @@ if wiredtiger: ], LIBDEPS=[ '$BUILD_DIR/mongo/db/serveronly', - '$BUILD_DIR/mongo/db/coredb', '$BUILD_DIR/mongo/util/ntservice_mock', ], NO_CRUTCH=True, diff --git a/src/mongo/dbtests/SConscript b/src/mongo/dbtests/SConscript index 2f63251efae..aaf6aa069c1 100644 --- a/src/mongo/dbtests/SConscript +++ b/src/mongo/dbtests/SConscript @@ -115,7 +115,6 @@ dbtest = env.Program( 'validate_tests.cpp', ], LIBDEPS=[ - "$BUILD_DIR/mongo/db/coredb", "$BUILD_DIR/mongo/db/auth/authmocks", "$BUILD_DIR/mongo/db/query/query", "$BUILD_DIR/mongo/db/storage/paths", diff --git a/src/mongo/executor/SConscript b/src/mongo/executor/SConscript index 116f77a83c1..9d5f74d3d22 100644 --- a/src/mongo/executor/SConscript +++ b/src/mongo/executor/SConscript @@ -117,9 +117,9 @@ env.CppUnitTest( env.Library(target='network_test_env', source=['network_test_env.cpp',], LIBDEPS=[ + '$BUILD_DIR/mongo/db/commands', 'network_interface_mock', 'task_executor_interface', - '$BUILD_DIR/mongo/db/coredb', ]) env.Library( diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript index ca3a32ded20..c4406e49778 100644 --- a/src/mongo/s/SConscript +++ b/src/mongo/s/SConscript @@ -147,7 +147,6 @@ env.CppUnitTest( LIBDEPS=[ 'coreshard', 'mongoscore', - '$BUILD_DIR/mongo/db/coredb', '$BUILD_DIR/mongo/db/auth/authorization_manager_mock_init', ] ) @@ -167,7 +166,6 @@ env.Library( 'version_manager.cpp', ], LIBDEPS=[ - '$BUILD_DIR/mongo/db/coredb', '$BUILD_DIR/mongo/s/query/cluster_cursor_manager', 'catalog/forwarding_catalog_manager', 'catalog/catalog_types', @@ -219,7 +217,6 @@ env.CppUnitTest( 'shard_key_pattern_test.cpp', ], LIBDEPS=[ - '$BUILD_DIR/mongo/db/coredb', "$BUILD_DIR/mongo/db/auth/authorization_manager_mock_init", 'coreshard', 'mongoscore', diff --git a/src/mongo/s/client/SConscript b/src/mongo/s/client/SConscript index 132045ffa48..42e8a03d3ef 100644 --- a/src/mongo/s/client/SConscript +++ b/src/mongo/s/client/SConscript @@ -52,7 +52,6 @@ env.CppUnitTest( LIBDEPS=[ 'sharding_client', 'sharding_connection_hook', - '$BUILD_DIR/mongo/db/coredb', '$BUILD_DIR/mongo/s/coreshard', '$BUILD_DIR/mongo/db/auth/authorization_manager_mock_init', '$BUILD_DIR/mongo/dbtests/mocklib', diff --git a/src/mongo/s/commands/SConscript b/src/mongo/s/commands/SConscript index 22ce62ed0a0..3a988888202 100644 --- a/src/mongo/s/commands/SConscript +++ b/src/mongo/s/commands/SConscript @@ -9,7 +9,7 @@ env.Library( 'cluster_get_shard_map_cmd.cpp', ], LIBDEPS=[ - '$BUILD_DIR/mongo/db/coredb', + '$BUILD_DIR/mongo/db/commands', '$BUILD_DIR/mongo/s/client/sharding_client', '$BUILD_DIR/mongo/s/coreshard', ] diff --git a/src/mongo/s/query/SConscript b/src/mongo/s/query/SConscript index dd0c741e72e..631ce6f5a1a 100644 --- a/src/mongo/s/query/SConscript +++ b/src/mongo/s/query/SConscript @@ -8,6 +8,7 @@ env.Library( "cluster_find.cpp", ], LIBDEPS=[ + '$BUILD_DIR/mongo/db/commands', '$BUILD_DIR/mongo/db/query/query_common', "cluster_client_cursor", "cluster_cursor_cleanup_job", diff --git a/src/mongo/util/SConscript b/src/mongo/util/SConscript index 01f6ea3ed1b..f1a5817df99 100644 --- a/src/mongo/util/SConscript +++ b/src/mongo/util/SConscript @@ -256,7 +256,10 @@ if get_option('allocator') == 'tcmalloc': 'tcmalloc_set_parameter.cpp', ], LIBDEPS=[ - '$BUILD_DIR/mongo/db/coredb', + # TODO: This is needless, the definition of + # ServerStatusSection should live in its own library, as + # it doesn't require all of the other commands. + '$BUILD_DIR/mongo/db/commands/core', '$BUILD_DIR/mongo/db/server_parameters', '$BUILD_DIR/mongo/util/net/network', ], |