summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/s/SConscript32
-rw-r--r--src/mongo/db/s/migration_destination_manager_legacy_commands.cpp (renamed from src/mongo/s/d_migrate.cpp)36
-rw-r--r--src/mongo/s/SConscript5
-rw-r--r--src/mongo/s/client/SConscript2
-rw-r--r--src/mongo/s/client/shard_connection.cpp2
-rw-r--r--src/mongo/s/client/sharding_connection_hook.cpp2
-rw-r--r--src/mongo/s/client/version_manager.cpp (renamed from src/mongo/s/version_manager.cpp)2
-rw-r--r--src/mongo/s/client/version_manager.h (renamed from src/mongo/s/version_manager.h)0
-rw-r--r--src/mongo/s/commands/cluster_commands_common.cpp2
-rw-r--r--src/mongo/s/commands/commands_public.cpp1
-rw-r--r--src/mongo/s/strategy.cpp2
11 files changed, 13 insertions, 73 deletions
diff --git a/src/mongo/db/s/SConscript b/src/mongo/db/s/SConscript
index 4b7dd637d15..37100b84cdd 100644
--- a/src/mongo/db/s/SConscript
+++ b/src/mongo/db/s/SConscript
@@ -48,6 +48,8 @@ env.Library(
source=[
'chunk_move_write_concern_options.cpp',
'collection_sharding_state.cpp',
+ 'migration_chunk_cloner_source.cpp',
+ 'migration_chunk_cloner_source_legacy.cpp',
'migration_destination_manager.cpp',
'migration_source_manager.cpp',
'move_timing_helper.cpp',
@@ -62,7 +64,6 @@ env.Library(
'$BUILD_DIR/mongo/db/common',
'$BUILD_DIR/mongo/s/sharding_initialization',
'metadata',
- 'migration_chunk_cloner_legacy',
'migration_types',
'type_shard_identity',
],
@@ -80,6 +81,8 @@ env.Library(
'cleanup_orphaned_cmd.cpp',
'get_shard_version_command.cpp',
'merge_chunks_command.cpp',
+ 'migration_chunk_cloner_source_legacy_commands.cpp',
+ 'migration_destination_manager_legacy_commands.cpp',
'move_chunk_command.cpp',
'set_shard_version_command.cpp',
'sharding_state_command.cpp',
@@ -100,33 +103,6 @@ env.Library(
],
)
-env.Library(
- target='migration_chunk_cloner',
- source=[
- 'migration_chunk_cloner_source.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
-)
-
-env.Library(
- target='migration_chunk_cloner_legacy',
- source=[
- 'migration_chunk_cloner_source_legacy.cpp',
- 'migration_chunk_cloner_source_legacy_commands.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/commands',
- 'migration_chunk_cloner',
- ],
- LIBDEPS_TAGS=[
- # Depends on symbols defined in files in serverOnlyFiles, and has many other missing
- # dependencies.
- 'incomplete',
- ],
-)
-
env.CppUnitTest(
target='migration_types_test',
source=[
diff --git a/src/mongo/s/d_migrate.cpp b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp
index 4b06e04d3fe..27bacbca200 100644
--- a/src/mongo/s/d_migrate.cpp
+++ b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2008-2015 MongoDB Inc.
+ * Copyright (C) 2016 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,
@@ -41,8 +41,6 @@
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/auth/privilege.h"
#include "mongo/db/commands.h"
-#include "mongo/db/db_raii.h"
-#include "mongo/db/dbhelpers.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/range_deleter_service.h"
#include "mongo/db/s/chunk_move_write_concern_options.h"
@@ -58,38 +56,6 @@ using std::string;
namespace {
-/* -----
- below this are the "to" side commands
-
- command to initiate
- worker thread
- does initial clone
- pulls initial change set
- keeps pulling
- keeps state
- command to get state
- commend to "commit"
-*/
-
-/**
- * Command for initiating the recipient side of the migration to start copying data
- * from the donor shard.
- *
- * {
- * _recvChunkStart: "namespace",
- * congfigServer: "hostAndPort",
- * from: "hostAndPort",
- * fromShardName: "shardName",
- * toShardName: "shardName",
- * min: {},
- * max: {},
- * shardKeyPattern: {},
- *
- * // optional
- * secondaryThrottle: bool, // defaults to true
- * writeConcern: {} // applies to individual writes.
- * }
- */
class RecvChunkStartCommand : public Command {
public:
RecvChunkStartCommand() : Command("_recvChunkStart") {}
diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript
index 617ced1a738..f99a591ca73 100644
--- a/src/mongo/s/SConscript
+++ b/src/mongo/s/SConscript
@@ -169,8 +169,9 @@ env.CppUnitTest(
'chunk_manager_tests.cpp'
],
LIBDEPS=[
+ '$BUILD_DIR/mongo/s/catalog/replset/catalog_manager_replica_set_test_fixture',
'coreshard',
- '$BUILD_DIR/mongo/s/catalog/replset/catalog_manager_replica_set_test_fixture']
+ ]
)
# This library contains sharding functionality used by both mongod and mongos. Certain tests,
@@ -184,7 +185,6 @@ env.Library(
'chunk_manager.cpp',
'config.cpp',
'grid.cpp',
- 'version_manager.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/s/query/cluster_cursor_manager',
@@ -258,7 +258,6 @@ env.CppUnitTest(
env.Library(
target='serveronly',
source=[
- "d_migrate.cpp",
'd_sharding_server_status.cpp',
"d_state.cpp",
],
diff --git a/src/mongo/s/client/SConscript b/src/mongo/s/client/SConscript
index fb51b343b5a..ca099a06930 100644
--- a/src/mongo/s/client/SConscript
+++ b/src/mongo/s/client/SConscript
@@ -9,13 +9,13 @@ env.Library(
'shard.cpp',
'shard_connection.cpp',
'shard_registry.cpp',
+ 'version_manager.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/client/clientdriver',
'$BUILD_DIR/mongo/client/fetcher',
'$BUILD_DIR/mongo/client/remote_command_runner_impl',
'$BUILD_DIR/mongo/client/remote_command_targeter',
- '$BUILD_DIR/mongo/db/commands',
'$BUILD_DIR/mongo/executor/connection_pool_stats',
'$BUILD_DIR/mongo/executor/task_executor_pool',
'$BUILD_DIR/mongo/rpc/metadata',
diff --git a/src/mongo/s/client/shard_connection.cpp b/src/mongo/s/client/shard_connection.cpp
index 0f64014f5e8..6e3dd46e6d2 100644
--- a/src/mongo/s/client/shard_connection.cpp
+++ b/src/mongo/s/client/shard_connection.cpp
@@ -40,8 +40,8 @@
#include "mongo/s/chunk_manager.h"
#include "mongo/s/client/shard.h"
#include "mongo/s/client/shard_registry.h"
+#include "mongo/s/client/version_manager.h"
#include "mongo/s/grid.h"
-#include "mongo/s/version_manager.h"
#include "mongo/util/concurrency/spin_lock.h"
#include "mongo/util/exit.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/s/client/sharding_connection_hook.cpp b/src/mongo/s/client/sharding_connection_hook.cpp
index 60ee98b5557..270bcd4320a 100644
--- a/src/mongo/s/client/sharding_connection_hook.cpp
+++ b/src/mongo/s/client/sharding_connection_hook.cpp
@@ -41,7 +41,7 @@
#include "mongo/db/auth/internal_user_auth.h"
#include "mongo/db/client.h"
#include "mongo/rpc/get_status_from_command_result.h"
-#include "mongo/s/version_manager.h"
+#include "mongo/s/client/version_manager.h"
#include "mongo/util/log.h"
namespace mongo {
diff --git a/src/mongo/s/version_manager.cpp b/src/mongo/s/client/version_manager.cpp
index 7cbb2787e82..6924b948869 100644
--- a/src/mongo/s/version_manager.cpp
+++ b/src/mongo/s/client/version_manager.cpp
@@ -30,7 +30,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/s/version_manager.h"
+#include "mongo/s/client/version_manager.h"
#include "mongo/client/dbclient_rs.h"
#include "mongo/db/namespace_string.h"
diff --git a/src/mongo/s/version_manager.h b/src/mongo/s/client/version_manager.h
index f03fb4f34c8..f03fb4f34c8 100644
--- a/src/mongo/s/version_manager.h
+++ b/src/mongo/s/client/version_manager.h
diff --git a/src/mongo/s/commands/cluster_commands_common.cpp b/src/mongo/s/commands/cluster_commands_common.cpp
index 73293e119d7..1dfc8dfdc8d 100644
--- a/src/mongo/s/commands/cluster_commands_common.cpp
+++ b/src/mongo/s/commands/cluster_commands_common.cpp
@@ -36,10 +36,10 @@
#include "mongo/db/commands.h"
#include "mongo/db/query/cursor_response.h"
#include "mongo/s/client/shard_connection.h"
+#include "mongo/s/client/version_manager.h"
#include "mongo/s/query/cluster_client_cursor_impl.h"
#include "mongo/s/query/cluster_cursor_manager.h"
#include "mongo/s/stale_exception.h"
-#include "mongo/s/version_manager.h"
#include "mongo/util/log.h"
namespace mongo {
diff --git a/src/mongo/s/commands/commands_public.cpp b/src/mongo/s/commands/commands_public.cpp
index 39b9efdca74..7f900466ccc 100644
--- a/src/mongo/s/commands/commands_public.cpp
+++ b/src/mongo/s/commands/commands_public.cpp
@@ -57,7 +57,6 @@
#include "mongo/s/grid.h"
#include "mongo/s/query/store_possible_cursor.h"
#include "mongo/s/stale_exception.h"
-#include "mongo/s/version_manager.h"
#include "mongo/scripting/engine.h"
#include "mongo/util/log.h"
#include "mongo/util/timer.h"
diff --git a/src/mongo/s/strategy.cpp b/src/mongo/s/strategy.cpp
index 3076539e5ed..e80b48f267f 100644
--- a/src/mongo/s/strategy.cpp
+++ b/src/mongo/s/strategy.cpp
@@ -57,6 +57,7 @@
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/client/shard_connection.h"
#include "mongo/s/client/shard_registry.h"
+#include "mongo/s/client/version_manager.h"
#include "mongo/s/cluster_explain.h"
#include "mongo/s/chunk_manager.h"
#include "mongo/s/chunk_version.h"
@@ -65,7 +66,6 @@
#include "mongo/s/query/cluster_find.h"
#include "mongo/s/request.h"
#include "mongo/s/stale_exception.h"
-#include "mongo/s/version_manager.h"
#include "mongo/s/write_ops/batched_command_request.h"
#include "mongo/s/write_ops/batch_upconvert.h"
#include "mongo/util/log.h"