summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-09-30 11:58:59 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-10-05 07:52:13 -0400
commit92bdb7b398f29bcaef88da18c7a2df03f07e77ca (patch)
tree8fc3857f6c0f324529056df42dfcf00883eb3cff /src/mongo
parente8345ff602fc528dbc33944b21bd344cbea5e3e5 (diff)
downloadmongo-92bdb7b398f29bcaef88da18c7a2df03f07e77ca.tar.gz
SERVER-26411 Move balancer sources under mongo/db/s
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/SConscript31
-rw-r--r--src/mongo/db/db.cpp2
-rw-r--r--src/mongo/db/repl/SConscript1
-rw-r--r--src/mongo/db/repl/replication_coordinator_external_state_impl.cpp2
-rw-r--r--src/mongo/db/s/SConscript39
-rw-r--r--src/mongo/db/s/balancer/balancer.cpp (renamed from src/mongo/s/balancer/balancer.cpp)9
-rw-r--r--src/mongo/db/s/balancer/balancer.h (renamed from src/mongo/s/balancer/balancer.h)4
-rw-r--r--src/mongo/db/s/balancer/balancer_chunk_selection_policy.cpp (renamed from src/mongo/s/balancer/balancer_chunk_selection_policy.cpp)2
-rw-r--r--src/mongo/db/s/balancer/balancer_chunk_selection_policy.h (renamed from src/mongo/s/balancer/balancer_chunk_selection_policy.h)2
-rw-r--r--src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp (renamed from src/mongo/s/balancer/balancer_chunk_selection_policy_impl.cpp)2
-rw-r--r--src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.h (renamed from src/mongo/s/balancer/balancer_chunk_selection_policy_impl.h)2
-rw-r--r--src/mongo/db/s/balancer/balancer_policy.cpp (renamed from src/mongo/s/balancer/balancer_policy.cpp)2
-rw-r--r--src/mongo/db/s/balancer/balancer_policy.h (renamed from src/mongo/s/balancer/balancer_policy.h)2
-rw-r--r--src/mongo/db/s/balancer/balancer_policy_test.cpp (renamed from src/mongo/s/balancer/balancer_policy_tests.cpp)2
-rw-r--r--src/mongo/db/s/balancer/cluster_statistics.cpp (renamed from src/mongo/s/balancer/cluster_statistics.cpp)2
-rw-r--r--src/mongo/db/s/balancer/cluster_statistics.h (renamed from src/mongo/s/balancer/cluster_statistics.h)0
-rw-r--r--src/mongo/db/s/balancer/cluster_statistics_impl.cpp (renamed from src/mongo/s/balancer/cluster_statistics_impl.cpp)2
-rw-r--r--src/mongo/db/s/balancer/cluster_statistics_impl.h (renamed from src/mongo/s/balancer/cluster_statistics_impl.h)2
-rw-r--r--src/mongo/db/s/balancer/cluster_statistics_test.cpp (renamed from src/mongo/s/balancer/cluster_statistics_test.cpp)2
-rw-r--r--src/mongo/db/s/balancer/migration_manager.cpp (renamed from src/mongo/s/balancer/migration_manager.cpp)6
-rw-r--r--src/mongo/db/s/balancer/migration_manager.h (renamed from src/mongo/s/balancer/migration_manager.h)2
-rw-r--r--src/mongo/db/s/balancer/migration_manager_test.cpp (renamed from src/mongo/s/balancer/migration_manager_test.cpp)4
-rw-r--r--src/mongo/db/s/balancer/scoped_migration_request.cpp (renamed from src/mongo/s/balancer/scoped_migration_request.cpp)4
-rw-r--r--src/mongo/db/s/balancer/scoped_migration_request.h (renamed from src/mongo/s/balancer/scoped_migration_request.h)2
-rw-r--r--src/mongo/db/s/balancer/scoped_migration_request_test.cpp (renamed from src/mongo/s/balancer/scoped_migration_request_test.cpp)4
-rw-r--r--src/mongo/db/s/balancer/type_migration.cpp (renamed from src/mongo/s/balancer/type_migration.cpp)2
-rw-r--r--src/mongo/db/s/balancer/type_migration.h (renamed from src/mongo/s/balancer/type_migration.h)2
-rw-r--r--src/mongo/db/s/balancer/type_migration_test.cpp (renamed from src/mongo/s/balancer/type_migration_test.cpp)2
-rw-r--r--src/mongo/db/s/config/configsvr_control_balancer_command.cpp4
-rw-r--r--src/mongo/db/s/config/configsvr_move_chunk_command.cpp2
-rw-r--r--src/mongo/s/SConscript37
-rw-r--r--src/mongo/s/balancer_configuration.cpp (renamed from src/mongo/s/balancer/balancer_configuration.cpp)2
-rw-r--r--src/mongo/s/balancer_configuration.h (renamed from src/mongo/s/balancer/balancer_configuration.h)0
-rw-r--r--src/mongo/s/balancer_configuration_test.cpp (renamed from src/mongo/s/balancer/balancer_configuration_test.cpp)2
-rw-r--r--src/mongo/s/catalog/replset_dist_lock_manager_test.cpp2
-rw-r--r--src/mongo/s/catalog/sharding_catalog_manager_impl.cpp4
-rw-r--r--src/mongo/s/chunk.cpp2
-rw-r--r--src/mongo/s/chunk_manager.cpp2
-rw-r--r--src/mongo/s/cluster_write.cpp2
-rw-r--r--src/mongo/s/commands/cluster_find_and_modify_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_map_reduce_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_move_chunk_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_shard_collection_cmd.cpp2
-rw-r--r--src/mongo/s/config.cpp2
-rw-r--r--src/mongo/s/config_server_test_fixture.cpp3
-rw-r--r--src/mongo/s/grid.cpp2
-rw-r--r--src/mongo/s/server.cpp2
-rw-r--r--src/mongo/s/sharding_initialization.cpp2
-rw-r--r--src/mongo/s/sharding_mongod_test_fixture.cpp2
-rw-r--r--src/mongo/s/sharding_test_fixture.cpp2
-rw-r--r--src/mongo/s/sharding_uptime_reporter.cpp2
51 files changed, 116 insertions, 106 deletions
diff --git a/src/mongo/SConscript b/src/mongo/SConscript
index 328ca04442b..ca0702f7a3d 100644
--- a/src/mongo/SConscript
+++ b/src/mongo/SConscript
@@ -251,22 +251,23 @@ generateConfigHeaderFile = env.Substfile(
env.Alias('generated-sources', generateConfigHeaderFile)
mongodLibDeps = [
- "db/commands/core",
- "db/conn_pool_options",
- "db/mongod_options",
- "db/mongodandmongos",
- "db/mongodwebserver",
- "db/serveronly",
- "db/repl/replset_commands",
- "db/repl/storage_interface_impl",
- "executor/network_interface_factory",
+ 'db/commands/core',
+ 'db/conn_pool_options',
+ 'db/mongod_options',
+ 'db/mongodandmongos',
+ 'db/mongodwebserver',
+ 'db/repl/replset_commands',
+ 'db/repl/storage_interface_impl',
+ 'db/s/balancer',
+ 'db/serveronly',
+ 'executor/network_interface_factory',
's/commands/shared_cluster_commands',
- "transport/transport_layer_legacy",
- "transport/service_entry_point_utils",
- "util/clock_sources",
- "util/fail_point",
- "util/ntservice",
- "util/version_impl",
+ 'transport/service_entry_point_utils',
+ 'transport/transport_layer_legacy',
+ 'util/clock_sources',
+ 'util/fail_point',
+ 'util/ntservice',
+ 'util/version_impl',
]
if has_option('use-cpu-profiler'):
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp
index 71754d037b7..1b67ab16783 100644
--- a/src/mongo/db/db.cpp
+++ b/src/mongo/db/db.cpp
@@ -89,6 +89,7 @@
#include "mongo/db/repl/storage_interface_impl.h"
#include "mongo/db/repl/topology_coordinator_impl.h"
#include "mongo/db/restapi.h"
+#include "mongo/db/s/balancer/balancer.h"
#include "mongo/db/s/sharding_initialization_mongod.h"
#include "mongo/db/s/sharding_state.h"
#include "mongo/db/s/sharding_state_recovery.h"
@@ -110,7 +111,6 @@
#include "mongo/db/wire_version.h"
#include "mongo/executor/network_interface_factory.h"
#include "mongo/platform/process_id.h"
-#include "mongo/s/balancer/balancer.h"
#include "mongo/s/client/shard_registry.h"
#include "mongo/s/grid.h"
#include "mongo/s/sharding_initialization.h"
diff --git a/src/mongo/db/repl/SConscript b/src/mongo/db/repl/SConscript
index 2ade8283ac6..81067fa175d 100644
--- a/src/mongo/db/repl/SConscript
+++ b/src/mongo/db/repl/SConscript
@@ -1104,6 +1104,7 @@ env.Library(
'$BUILD_DIR/mongo/db/curop',
'$BUILD_DIR/mongo/db/lasterror',
'$BUILD_DIR/mongo/db/query/query',
+ '$BUILD_DIR/mongo/db/s/balancer',
'$BUILD_DIR/mongo/db/service_context',
'$BUILD_DIR/mongo/db/stats/counters',
],
diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
index b3d4b4ffbb4..aedee756112 100644
--- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
@@ -65,6 +65,7 @@
#include "mongo/db/repl/snapshot_thread.h"
#include "mongo/db/repl/storage_interface.h"
#include "mongo/db/repl/sync_tail.h"
+#include "mongo/db/s/balancer/balancer.h"
#include "mongo/db/s/sharding_state.h"
#include "mongo/db/s/sharding_state_recovery.h"
#include "mongo/db/server_options.h"
@@ -74,7 +75,6 @@
#include "mongo/executor/network_interface.h"
#include "mongo/executor/network_interface_factory.h"
#include "mongo/executor/thread_pool_task_executor.h"
-#include "mongo/s/balancer/balancer.h"
#include "mongo/s/catalog/sharding_catalog_manager.h"
#include "mongo/s/catalog/type_shard.h"
#include "mongo/s/client/shard_registry.h"
diff --git a/src/mongo/db/s/SConscript b/src/mongo/db/s/SConscript
index c30adb6e479..aa7365abcb6 100644
--- a/src/mongo/db/s/SConscript
+++ b/src/mongo/db/s/SConscript
@@ -81,6 +81,44 @@ env.Library(
)
env.Library(
+ target='balancer',
+ source=[
+ 'balancer/balancer.cpp',
+ 'balancer/balancer_chunk_selection_policy.cpp',
+ 'balancer/balancer_chunk_selection_policy_impl.cpp',
+ 'balancer/balancer_policy.cpp',
+ 'balancer/cluster_statistics.cpp',
+ 'balancer/cluster_statistics_impl.cpp',
+ 'balancer/migration_manager.cpp',
+ 'balancer/scoped_migration_request.cpp',
+ 'balancer/type_migration.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/base',
+ '$BUILD_DIR/mongo/bson/util/bson_extract',
+ '$BUILD_DIR/mongo/db/common',
+ '$BUILD_DIR/mongo/s/coreshard',
+ ],
+)
+
+env.CppUnitTest(
+ target='balancer_test',
+ source=[
+ 'balancer/balancer_policy_test.cpp',
+ 'balancer/cluster_statistics_test.cpp',
+ 'balancer/migration_manager_test.cpp',
+ 'balancer/scoped_migration_request_test.cpp',
+ 'balancer/type_migration_test.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/s/config_server_test_fixture',
+ '$BUILD_DIR/mongo/s/coreshard',
+ '$BUILD_DIR/mongo/util/version_impl',
+ 'balancer',
+ ]
+)
+
+env.Library(
target='commands',
source=[
'check_sharding_index_command.cpp',
@@ -114,6 +152,7 @@ env.Library(
'$BUILD_DIR/mongo/db/dbhelpers',
'$BUILD_DIR/mongo/db/repl/repl_coordinator_global',
'$BUILD_DIR/mongo/s/serveronly',
+ 'balancer',
'metadata',
'sharding',
],
diff --git a/src/mongo/s/balancer/balancer.cpp b/src/mongo/db/s/balancer/balancer.cpp
index 40982f8cd03..1ed171c7c04 100644
--- a/src/mongo/s/balancer/balancer.cpp
+++ b/src/mongo/db/s/balancer/balancer.cpp
@@ -30,7 +30,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/s/balancer/balancer.h"
+#include "mongo/db/s/balancer/balancer.h"
#include <algorithm>
#include <string>
@@ -41,9 +41,9 @@
#include "mongo/db/client.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/operation_context.h"
-#include "mongo/s/balancer/balancer_chunk_selection_policy_impl.h"
-#include "mongo/s/balancer/balancer_configuration.h"
-#include "mongo/s/balancer/cluster_statistics_impl.h"
+#include "mongo/db/s/balancer/balancer_chunk_selection_policy_impl.h"
+#include "mongo/db/s/balancer/cluster_statistics_impl.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/catalog/type_chunk.h"
#include "mongo/s/client/shard.h"
@@ -118,7 +118,6 @@ private:
* in the cluster.
*/
void warnOnMultiVersion(const vector<ClusterStatistics::ShardStatistics>& clusterStats) {
-
auto&& vii = VersionInfoInterface::instance();
bool isMultiVersion = false;
diff --git a/src/mongo/s/balancer/balancer.h b/src/mongo/db/s/balancer/balancer.h
index bc18818484d..d625dc64cda 100644
--- a/src/mongo/s/balancer/balancer.h
+++ b/src/mongo/db/s/balancer/balancer.h
@@ -29,8 +29,8 @@
#pragma once
#include "mongo/base/disallow_copying.h"
-#include "mongo/s/balancer/balancer_chunk_selection_policy.h"
-#include "mongo/s/balancer/migration_manager.h"
+#include "mongo/db/s/balancer/balancer_chunk_selection_policy.h"
+#include "mongo/db/s/balancer/migration_manager.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/mutex.h"
#include "mongo/stdx/thread.h"
diff --git a/src/mongo/s/balancer/balancer_chunk_selection_policy.cpp b/src/mongo/db/s/balancer/balancer_chunk_selection_policy.cpp
index 2ee21b6ae87..dd9b972566d 100644
--- a/src/mongo/s/balancer/balancer_chunk_selection_policy.cpp
+++ b/src/mongo/db/s/balancer/balancer_chunk_selection_policy.cpp
@@ -28,7 +28,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/s/balancer/balancer_chunk_selection_policy.h"
+#include "mongo/db/s/balancer/balancer_chunk_selection_policy.h"
#include "mongo/util/mongoutils/str.h"
diff --git a/src/mongo/s/balancer/balancer_chunk_selection_policy.h b/src/mongo/db/s/balancer/balancer_chunk_selection_policy.h
index ac227183ddf..e2d7f6a024e 100644
--- a/src/mongo/s/balancer/balancer_chunk_selection_policy.h
+++ b/src/mongo/db/s/balancer/balancer_chunk_selection_policy.h
@@ -32,7 +32,7 @@
#include <vector>
#include "mongo/base/disallow_copying.h"
-#include "mongo/s/balancer/balancer_policy.h"
+#include "mongo/db/s/balancer/balancer_policy.h"
#include "mongo/s/catalog/type_chunk.h"
#include "mongo/s/chunk_version.h"
diff --git a/src/mongo/s/balancer/balancer_chunk_selection_policy_impl.cpp b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp
index c8b4b8d115d..d3c317b6e2b 100644
--- a/src/mongo/s/balancer/balancer_chunk_selection_policy_impl.cpp
+++ b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp
@@ -30,7 +30,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/s/balancer/balancer_chunk_selection_policy_impl.h"
+#include "mongo/db/s/balancer/balancer_chunk_selection_policy_impl.h"
#include <set>
#include <vector>
diff --git a/src/mongo/s/balancer/balancer_chunk_selection_policy_impl.h b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.h
index ffb769121b7..f010d8c723b 100644
--- a/src/mongo/s/balancer/balancer_chunk_selection_policy_impl.h
+++ b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.h
@@ -28,7 +28,7 @@
#pragma once
-#include "mongo/s/balancer/balancer_chunk_selection_policy.h"
+#include "mongo/db/s/balancer/balancer_chunk_selection_policy.h"
namespace mongo {
diff --git a/src/mongo/s/balancer/balancer_policy.cpp b/src/mongo/db/s/balancer/balancer_policy.cpp
index 67c75dd590b..4e8f13d8232 100644
--- a/src/mongo/s/balancer/balancer_policy.cpp
+++ b/src/mongo/db/s/balancer/balancer_policy.cpp
@@ -30,7 +30,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/s/balancer/balancer_policy.h"
+#include "mongo/db/s/balancer/balancer_policy.h"
#include "mongo/bson/simple_bsonobj_comparator.h"
#include "mongo/s/catalog/type_shard.h"
diff --git a/src/mongo/s/balancer/balancer_policy.h b/src/mongo/db/s/balancer/balancer_policy.h
index 97a1f2e91b1..c1438ba995e 100644
--- a/src/mongo/s/balancer/balancer_policy.h
+++ b/src/mongo/db/s/balancer/balancer_policy.h
@@ -31,7 +31,7 @@
#include "mongo/base/disallow_copying.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/bson/simple_bsonobj_comparator.h"
-#include "mongo/s/balancer/cluster_statistics.h"
+#include "mongo/db/s/balancer/cluster_statistics.h"
#include "mongo/s/catalog/type_chunk.h"
#include "mongo/s/client/shard.h"
diff --git a/src/mongo/s/balancer/balancer_policy_tests.cpp b/src/mongo/db/s/balancer/balancer_policy_test.cpp
index b6024c8f1d5..3d5170f3414 100644
--- a/src/mongo/s/balancer/balancer_policy_tests.cpp
+++ b/src/mongo/db/s/balancer/balancer_policy_test.cpp
@@ -30,8 +30,8 @@
#include "mongo/platform/basic.h"
+#include "mongo/db/s/balancer/balancer_policy.h"
#include "mongo/platform/random.h"
-#include "mongo/s/balancer/balancer_policy.h"
#include "mongo/s/catalog/type_chunk.h"
#include "mongo/unittest/unittest.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/s/balancer/cluster_statistics.cpp b/src/mongo/db/s/balancer/cluster_statistics.cpp
index d42994379ef..495a54b0493 100644
--- a/src/mongo/s/balancer/cluster_statistics.cpp
+++ b/src/mongo/db/s/balancer/cluster_statistics.cpp
@@ -28,7 +28,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/s/balancer/cluster_statistics.h"
+#include "mongo/db/s/balancer/cluster_statistics.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/bson/bsonobjbuilder.h"
diff --git a/src/mongo/s/balancer/cluster_statistics.h b/src/mongo/db/s/balancer/cluster_statistics.h
index 8963720ee6f..8963720ee6f 100644
--- a/src/mongo/s/balancer/cluster_statistics.h
+++ b/src/mongo/db/s/balancer/cluster_statistics.h
diff --git a/src/mongo/s/balancer/cluster_statistics_impl.cpp b/src/mongo/db/s/balancer/cluster_statistics_impl.cpp
index b6e734c6fc2..6ae4d9c223f 100644
--- a/src/mongo/s/balancer/cluster_statistics_impl.cpp
+++ b/src/mongo/db/s/balancer/cluster_statistics_impl.cpp
@@ -30,7 +30,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/s/balancer/cluster_statistics_impl.h"
+#include "mongo/db/s/balancer/cluster_statistics_impl.h"
#include "mongo/base/status_with.h"
#include "mongo/bson/util/bson_extract.h"
diff --git a/src/mongo/s/balancer/cluster_statistics_impl.h b/src/mongo/db/s/balancer/cluster_statistics_impl.h
index 493c792a713..d03a2f2b403 100644
--- a/src/mongo/s/balancer/cluster_statistics_impl.h
+++ b/src/mongo/db/s/balancer/cluster_statistics_impl.h
@@ -28,7 +28,7 @@
#pragma once
-#include "mongo/s/balancer/cluster_statistics.h"
+#include "mongo/db/s/balancer/cluster_statistics.h"
namespace mongo {
diff --git a/src/mongo/s/balancer/cluster_statistics_test.cpp b/src/mongo/db/s/balancer/cluster_statistics_test.cpp
index c9115b6dafd..2f6fd15b45b 100644
--- a/src/mongo/s/balancer/cluster_statistics_test.cpp
+++ b/src/mongo/db/s/balancer/cluster_statistics_test.cpp
@@ -28,7 +28,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/s/balancer/cluster_statistics.h"
+#include "mongo/db/s/balancer/cluster_statistics.h"
#include "mongo/unittest/unittest.h"
namespace mongo {
diff --git a/src/mongo/s/balancer/migration_manager.cpp b/src/mongo/db/s/balancer/migration_manager.cpp
index c5af288fb2f..e1c033669d7 100644
--- a/src/mongo/s/balancer/migration_manager.cpp
+++ b/src/mongo/db/s/balancer/migration_manager.cpp
@@ -30,7 +30,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/s/balancer/migration_manager.h"
+#include "mongo/db/s/balancer/migration_manager.h"
#include <memory>
@@ -38,10 +38,10 @@
#include "mongo/bson/util/bson_extract.h"
#include "mongo/client/remote_command_targeter.h"
#include "mongo/db/client.h"
+#include "mongo/db/s/balancer/scoped_migration_request.h"
+#include "mongo/db/s/balancer/type_migration.h"
#include "mongo/executor/task_executor_pool.h"
#include "mongo/rpc/get_status_from_command_result.h"
-#include "mongo/s/balancer/scoped_migration_request.h"
-#include "mongo/s/balancer/type_migration.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/client/shard_registry.h"
#include "mongo/s/client/shard_registry.h"
diff --git a/src/mongo/s/balancer/migration_manager.h b/src/mongo/db/s/balancer/migration_manager.h
index 20585df7c23..f7730ba65e1 100644
--- a/src/mongo/s/balancer/migration_manager.h
+++ b/src/mongo/db/s/balancer/migration_manager.h
@@ -35,8 +35,8 @@
#include "mongo/base/disallow_copying.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/db/namespace_string.h"
+#include "mongo/db/s/balancer/balancer_policy.h"
#include "mongo/executor/task_executor.h"
-#include "mongo/s/balancer/balancer_policy.h"
#include "mongo/s/catalog/dist_lock_manager.h"
#include "mongo/s/migration_secondary_throttle_options.h"
#include "mongo/stdx/condition_variable.h"
diff --git a/src/mongo/s/balancer/migration_manager_test.cpp b/src/mongo/db/s/balancer/migration_manager_test.cpp
index 64f1aa193ed..87353c5dc4b 100644
--- a/src/mongo/s/balancer/migration_manager_test.cpp
+++ b/src/mongo/db/s/balancer/migration_manager_test.cpp
@@ -31,9 +31,9 @@
#include "mongo/client/remote_command_targeter_mock.h"
#include "mongo/db/client.h"
#include "mongo/db/commands.h"
+#include "mongo/db/s/balancer/migration_manager.h"
+#include "mongo/db/s/balancer/type_migration.h"
#include "mongo/db/write_concern_options.h"
-#include "mongo/s/balancer/migration_manager.h"
-#include "mongo/s/balancer/type_migration.h"
#include "mongo/s/catalog/dist_lock_manager_mock.h"
#include "mongo/s/catalog/sharding_catalog_client_impl.h"
#include "mongo/s/catalog/type_collection.h"
diff --git a/src/mongo/s/balancer/scoped_migration_request.cpp b/src/mongo/db/s/balancer/scoped_migration_request.cpp
index 5b02d57b1d8..ebc3e293814 100644
--- a/src/mongo/s/balancer/scoped_migration_request.cpp
+++ b/src/mongo/db/s/balancer/scoped_migration_request.cpp
@@ -30,11 +30,11 @@
#include "mongo/platform/basic.h"
-#include "mongo/s/balancer/scoped_migration_request.h"
+#include "mongo/db/s/balancer/scoped_migration_request.h"
#include "mongo/db/repl/replication_coordinator_global.h"
+#include "mongo/db/s/balancer/type_migration.h"
#include "mongo/db/write_concern_options.h"
-#include "mongo/s/balancer/type_migration.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/client/shard_registry.h"
#include "mongo/s/grid.h"
diff --git a/src/mongo/s/balancer/scoped_migration_request.h b/src/mongo/db/s/balancer/scoped_migration_request.h
index 8595671dc4d..18d986910de 100644
--- a/src/mongo/s/balancer/scoped_migration_request.h
+++ b/src/mongo/db/s/balancer/scoped_migration_request.h
@@ -29,7 +29,7 @@
#pragma once
#include "mongo/base/status_with.h"
-#include "mongo/s/balancer/balancer_policy.h"
+#include "mongo/db/s/balancer/balancer_policy.h"
#include "mongo/s/migration_secondary_throttle_options.h"
namespace mongo {
diff --git a/src/mongo/s/balancer/scoped_migration_request_test.cpp b/src/mongo/db/s/balancer/scoped_migration_request_test.cpp
index 48c0d501136..0b6474eaa46 100644
--- a/src/mongo/s/balancer/scoped_migration_request_test.cpp
+++ b/src/mongo/db/s/balancer/scoped_migration_request_test.cpp
@@ -28,9 +28,9 @@
#include "mongo/platform/basic.h"
-#include "mongo/s/balancer/scoped_migration_request.h"
+#include "mongo/db/s/balancer/scoped_migration_request.h"
-#include "mongo/s/balancer/type_migration.h"
+#include "mongo/db/s/balancer/type_migration.h"
#include "mongo/s/client/shard_registry.h"
#include "mongo/s/config_server_test_fixture.h"
#include "mongo/s/migration_secondary_throttle_options.h"
diff --git a/src/mongo/s/balancer/type_migration.cpp b/src/mongo/db/s/balancer/type_migration.cpp
index 963c40b30e3..6dd2fe50c23 100644
--- a/src/mongo/s/balancer/type_migration.cpp
+++ b/src/mongo/db/s/balancer/type_migration.cpp
@@ -28,7 +28,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/s/balancer/type_migration.h"
+#include "mongo/db/s/balancer/type_migration.h"
#include "mongo/bson/util/bson_extract.h"
#include "mongo/s/catalog/type_chunk.h"
diff --git a/src/mongo/s/balancer/type_migration.h b/src/mongo/db/s/balancer/type_migration.h
index 5f2948e9dfe..41d6ed72f48 100644
--- a/src/mongo/s/balancer/type_migration.h
+++ b/src/mongo/db/s/balancer/type_migration.h
@@ -29,7 +29,7 @@
#pragma once
#include "mongo/bson/bsonobj.h"
-#include "mongo/s/balancer/balancer_policy.h"
+#include "mongo/db/s/balancer/balancer_policy.h"
#include "mongo/s/chunk_version.h"
#include "mongo/s/client/shard.h"
diff --git a/src/mongo/s/balancer/type_migration_test.cpp b/src/mongo/db/s/balancer/type_migration_test.cpp
index d3a352301aa..ffd0de4127b 100644
--- a/src/mongo/s/balancer/type_migration_test.cpp
+++ b/src/mongo/db/s/balancer/type_migration_test.cpp
@@ -29,7 +29,7 @@
#include "mongo/platform/basic.h"
#include "mongo/db/jsobj.h"
-#include "mongo/s/balancer/type_migration.h"
+#include "mongo/db/s/balancer/type_migration.h"
#include "mongo/s/catalog/type_chunk.h"
#include "mongo/unittest/unittest.h"
diff --git a/src/mongo/db/s/config/configsvr_control_balancer_command.cpp b/src/mongo/db/s/config/configsvr_control_balancer_command.cpp
index 3128023f7d6..7c269919384 100644
--- a/src/mongo/db/s/config/configsvr_control_balancer_command.cpp
+++ b/src/mongo/db/s/config/configsvr_control_balancer_command.cpp
@@ -33,8 +33,8 @@
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/auth/privilege.h"
#include "mongo/db/commands.h"
-#include "mongo/s/balancer/balancer.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/db/s/balancer/balancer.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/grid.h"
#include "mongo/util/mongoutils/str.h"
diff --git a/src/mongo/db/s/config/configsvr_move_chunk_command.cpp b/src/mongo/db/s/config/configsvr_move_chunk_command.cpp
index 3a6cd82b097..0e64207a217 100644
--- a/src/mongo/db/s/config/configsvr_move_chunk_command.cpp
+++ b/src/mongo/db/s/config/configsvr_move_chunk_command.cpp
@@ -36,7 +36,7 @@
#include "mongo/db/auth/privilege.h"
#include "mongo/db/commands.h"
#include "mongo/db/namespace_string.h"
-#include "mongo/s/balancer/balancer.h"
+#include "mongo/db/s/balancer/balancer.h"
#include "mongo/s/request_types/balance_chunk_request_type.h"
#include "mongo/util/log.h"
#include "mongo/util/mongoutils/str.h"
diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript
index 91be5a20f2d..1983abd864d 100644
--- a/src/mongo/s/SConscript
+++ b/src/mongo/s/SConscript
@@ -45,7 +45,6 @@ env.Library(
env.Library(
target='common',
source=[
- 'balancer/type_migration.cpp',
'catalog/mongo_version_range.cpp',
'catalog/type_changelog.cpp',
'catalog/type_chunk.cpp',
@@ -93,7 +92,6 @@ env.Library(
LIBDEPS=[
'$BUILD_DIR/mongo/db/auth/authorization_manager_mock_init',
'$BUILD_DIR/mongo/db/query/collation/collator_factory_mock',
- '$BUILD_DIR/mongo/db/service_context_noop_init',
'$BUILD_DIR/mongo/client/remote_command_targeter_mock',
'$BUILD_DIR/mongo/executor/network_test_env',
'$BUILD_DIR/mongo/executor/task_executor_pool',
@@ -155,7 +153,6 @@ env.CppUnitTest(
env.CppUnitTest(
target='sharding_common_test',
source=[
- 'balancer/type_migration_test.cpp',
'catalog/type_changelog_test.cpp',
'catalog/type_chunk_test.cpp',
'catalog/type_collection_test.cpp',
@@ -252,20 +249,11 @@ env.CppUnitTest('request_types_test',
],
)
-# This library contains sharding functionality used by both mongod and mongos. Certain tests,
-# which exercise this functionality also link against it.
+# This library contains sharding functionality used by both mongod and mongos
env.Library(
target='coreshard',
source=[
- 'balancer/balancer.cpp',
- 'balancer/balancer_chunk_selection_policy.cpp',
- 'balancer/balancer_chunk_selection_policy_impl.cpp',
- 'balancer/balancer_configuration.cpp',
- 'balancer/balancer_policy.cpp',
- 'balancer/cluster_statistics.cpp',
- 'balancer/cluster_statistics_impl.cpp',
- 'balancer/migration_manager.cpp',
- 'balancer/scoped_migration_request.cpp',
+ 'balancer_configuration.cpp',
'catalog/catalog_cache.cpp',
'chunk.cpp',
'chunk_manager.cpp',
@@ -329,15 +317,11 @@ env.Library(
)
env.CppUnitTest(
- target='balancer_test',
+ target='balancer_configuration_test',
source=[
- 'balancer/balancer_configuration_test.cpp',
- 'balancer/balancer_policy_tests.cpp',
- 'balancer/cluster_statistics_test.cpp',
+ 'balancer_configuration_test.cpp',
],
LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authorization_manager_mock_init',
- '$BUILD_DIR/mongo/db/service_context_noop_init',
'coreshard',
'sharding_test_fixture',
]
@@ -354,19 +338,6 @@ env.CppUnitTest(
]
)
-env.CppUnitTest(
- target='migration_manager_test',
- source=[
- 'balancer/migration_manager_test.cpp',
- 'balancer/scoped_migration_request_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/util/version_impl',
- 'config_server_test_fixture',
- 'coreshard',
- ]
-)
-
env.Library(
target='local_sharding_info',
source=[
diff --git a/src/mongo/s/balancer/balancer_configuration.cpp b/src/mongo/s/balancer_configuration.cpp
index 0c86d4d35b9..79098a2ec4a 100644
--- a/src/mongo/s/balancer/balancer_configuration.cpp
+++ b/src/mongo/s/balancer_configuration.cpp
@@ -30,7 +30,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include <algorithm>
diff --git a/src/mongo/s/balancer/balancer_configuration.h b/src/mongo/s/balancer_configuration.h
index 2f5370d162c..2f5370d162c 100644
--- a/src/mongo/s/balancer/balancer_configuration.h
+++ b/src/mongo/s/balancer_configuration.h
diff --git a/src/mongo/s/balancer/balancer_configuration_test.cpp b/src/mongo/s/balancer_configuration_test.cpp
index 7e81885b662..e889e4a5ded 100644
--- a/src/mongo/s/balancer/balancer_configuration_test.cpp
+++ b/src/mongo/s/balancer_configuration_test.cpp
@@ -38,7 +38,7 @@
#include "mongo/executor/remote_command_request.h"
#include "mongo/rpc/metadata/repl_set_metadata.h"
#include "mongo/rpc/metadata/server_selection_metadata.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/sharding_test_fixture.h"
#include "mongo/unittest/unittest.h"
diff --git a/src/mongo/s/catalog/replset_dist_lock_manager_test.cpp b/src/mongo/s/catalog/replset_dist_lock_manager_test.cpp
index 02c9c8f6b1f..4862d1eeae9 100644
--- a/src/mongo/s/catalog/replset_dist_lock_manager_test.cpp
+++ b/src/mongo/s/catalog/replset_dist_lock_manager_test.cpp
@@ -47,7 +47,7 @@
#include "mongo/db/service_context_noop.h"
#include "mongo/executor/task_executor.h"
#include "mongo/executor/task_executor_pool.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/dist_lock_catalog_mock.h"
#include "mongo/s/catalog/replset_dist_lock_manager.h"
#include "mongo/s/catalog/sharding_catalog_client_mock.h"
diff --git a/src/mongo/s/catalog/sharding_catalog_manager_impl.cpp b/src/mongo/s/catalog/sharding_catalog_manager_impl.cpp
index cc4220e2e96..025b573e601 100644
--- a/src/mongo/s/catalog/sharding_catalog_manager_impl.cpp
+++ b/src/mongo/s/catalog/sharding_catalog_manager_impl.cpp
@@ -50,14 +50,14 @@
#include "mongo/db/namespace_string.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/repl/repl_client_info.h"
+#include "mongo/db/s/balancer/balancer_policy.h"
+#include "mongo/db/s/balancer/type_migration.h"
#include "mongo/db/s/sharding_state.h"
#include "mongo/db/s/type_shard_identity.h"
#include "mongo/db/wire_version.h"
#include "mongo/executor/network_interface.h"
#include "mongo/executor/task_executor.h"
#include "mongo/rpc/get_status_from_command_result.h"
-#include "mongo/s/balancer/balancer_policy.h"
-#include "mongo/s/balancer/type_migration.h"
#include "mongo/s/catalog/config_server_version.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/catalog/type_collection.h"
diff --git a/src/mongo/s/chunk.cpp b/src/mongo/s/chunk.cpp
index bcdd2dd09c7..2b091b89e42 100644
--- a/src/mongo/s/chunk.cpp
+++ b/src/mongo/s/chunk.cpp
@@ -37,7 +37,7 @@
#include "mongo/db/commands.h"
#include "mongo/db/lasterror.h"
#include "mongo/platform/random.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/catalog/type_collection.h"
#include "mongo/s/chunk_manager.h"
diff --git a/src/mongo/s/chunk_manager.cpp b/src/mongo/s/chunk_manager.cpp
index bf9998a48a5..d1b9a1490f4 100644
--- a/src/mongo/s/chunk_manager.cpp
+++ b/src/mongo/s/chunk_manager.cpp
@@ -49,7 +49,7 @@
#include "mongo/db/query/query_planner.h"
#include "mongo/db/query/query_planner_common.h"
#include "mongo/rpc/get_status_from_command_result.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/catalog/type_collection.h"
diff --git a/src/mongo/s/cluster_write.cpp b/src/mongo/s/cluster_write.cpp
index cf1e8df7a41..f7e8f460148 100644
--- a/src/mongo/s/cluster_write.cpp
+++ b/src/mongo/s/cluster_write.cpp
@@ -38,7 +38,7 @@
#include "mongo/base/status.h"
#include "mongo/db/index/index_descriptor.h"
#include "mongo/db/write_concern_options.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/chunk_manager.h"
diff --git a/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp b/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp
index 73f1860118d..a86d3b6c2f0 100644
--- a/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp
+++ b/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp
@@ -38,7 +38,7 @@
#include "mongo/db/commands/find_and_modify.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/query/collation/collator_factory_interface.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/chunk_manager.h"
#include "mongo/s/client/shard_connection.h"
diff --git a/src/mongo/s/commands/cluster_map_reduce_cmd.cpp b/src/mongo/s/commands/cluster_map_reduce_cmd.cpp
index bd8c6c5ace2..b2b863d7201 100644
--- a/src/mongo/s/commands/cluster_map_reduce_cmd.cpp
+++ b/src/mongo/s/commands/cluster_map_reduce_cmd.cpp
@@ -41,7 +41,7 @@
#include "mongo/db/commands.h"
#include "mongo/db/commands/mr.h"
#include "mongo/db/query/collation/collation_spec.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/catalog/dist_lock_manager.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
diff --git a/src/mongo/s/commands/cluster_move_chunk_cmd.cpp b/src/mongo/s/commands/cluster_move_chunk_cmd.cpp
index 4236beb6121..1040669d275 100644
--- a/src/mongo/s/commands/cluster_move_chunk_cmd.cpp
+++ b/src/mongo/s/commands/cluster_move_chunk_cmd.cpp
@@ -38,7 +38,7 @@
#include "mongo/db/client.h"
#include "mongo/db/commands.h"
#include "mongo/db/write_concern_options.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/client/shard_connection.h"
#include "mongo/s/client/shard_registry.h"
diff --git a/src/mongo/s/commands/cluster_shard_collection_cmd.cpp b/src/mongo/s/commands/cluster_shard_collection_cmd.cpp
index 255578c28bd..6c374d4f6e1 100644
--- a/src/mongo/s/commands/cluster_shard_collection_cmd.cpp
+++ b/src/mongo/s/commands/cluster_shard_collection_cmd.cpp
@@ -49,7 +49,7 @@
#include "mongo/db/operation_context.h"
#include "mongo/db/query/collation/collator_factory_interface.h"
#include "mongo/db/write_concern_options.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/chunk_manager.h"
diff --git a/src/mongo/s/config.cpp b/src/mongo/s/config.cpp
index 5705aee7740..36f7a97e55d 100644
--- a/src/mongo/s/config.cpp
+++ b/src/mongo/s/config.cpp
@@ -37,7 +37,7 @@
#include "mongo/db/lasterror.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/write_concern.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/catalog/type_chunk.h"
diff --git a/src/mongo/s/config_server_test_fixture.cpp b/src/mongo/s/config_server_test_fixture.cpp
index 9a8f8a33dfb..563c88d807b 100644
--- a/src/mongo/s/config_server_test_fixture.cpp
+++ b/src/mongo/s/config_server_test_fixture.cpp
@@ -46,13 +46,12 @@
#include "mongo/db/repl/oplog.h"
#include "mongo/db/repl/read_concern_args.h"
#include "mongo/db/repl/repl_settings.h"
-#include "mongo/db/service_context_noop.h"
#include "mongo/executor/network_interface_mock.h"
#include "mongo/executor/task_executor_pool.h"
#include "mongo/executor/thread_pool_task_executor_test_fixture.h"
#include "mongo/rpc/metadata/repl_set_metadata.h"
#include "mongo/rpc/metadata/server_selection_metadata.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/catalog/dist_lock_catalog_impl.h"
#include "mongo/s/catalog/replset_dist_lock_manager.h"
diff --git a/src/mongo/s/grid.cpp b/src/mongo/s/grid.cpp
index fbc973788d9..98853d566f4 100644
--- a/src/mongo/s/grid.cpp
+++ b/src/mongo/s/grid.cpp
@@ -36,7 +36,7 @@
#include "mongo/db/server_options.h"
#include "mongo/executor/task_executor.h"
#include "mongo/executor/task_executor_pool.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/catalog/sharding_catalog_manager.h"
diff --git a/src/mongo/s/server.cpp b/src/mongo/s/server.cpp
index 3a2bce364e5..6e446427982 100644
--- a/src/mongo/s/server.cpp
+++ b/src/mongo/s/server.cpp
@@ -62,7 +62,7 @@
#include "mongo/db/wire_version.h"
#include "mongo/executor/task_executor_pool.h"
#include "mongo/platform/process_id.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/catalog/sharding_catalog_manager.h"
#include "mongo/s/client/shard_connection.h"
diff --git a/src/mongo/s/sharding_initialization.cpp b/src/mongo/s/sharding_initialization.cpp
index 51b30053305..97b49a46c8f 100644
--- a/src/mongo/s/sharding_initialization.cpp
+++ b/src/mongo/s/sharding_initialization.cpp
@@ -46,7 +46,7 @@
#include "mongo/executor/thread_pool_task_executor.h"
#include "mongo/rpc/metadata/config_server_metadata.h"
#include "mongo/rpc/metadata/metadata_hook.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/catalog/dist_lock_catalog_impl.h"
#include "mongo/s/catalog/replset_dist_lock_manager.h"
diff --git a/src/mongo/s/sharding_mongod_test_fixture.cpp b/src/mongo/s/sharding_mongod_test_fixture.cpp
index 2c37be980a9..c905fe3cdbd 100644
--- a/src/mongo/s/sharding_mongod_test_fixture.cpp
+++ b/src/mongo/s/sharding_mongod_test_fixture.cpp
@@ -54,7 +54,7 @@
#include "mongo/executor/thread_pool_task_executor_test_fixture.h"
#include "mongo/rpc/metadata/repl_set_metadata.h"
#include "mongo/rpc/metadata/server_selection_metadata.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/catalog/dist_lock_catalog.h"
#include "mongo/s/catalog/dist_lock_manager.h"
diff --git a/src/mongo/s/sharding_test_fixture.cpp b/src/mongo/s/sharding_test_fixture.cpp
index c7ab3484da3..0f927c81614 100644
--- a/src/mongo/s/sharding_test_fixture.cpp
+++ b/src/mongo/s/sharding_test_fixture.cpp
@@ -49,7 +49,7 @@
#include "mongo/executor/thread_pool_task_executor_test_fixture.h"
#include "mongo/rpc/metadata/repl_set_metadata.h"
#include "mongo/rpc/metadata/server_selection_metadata.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/catalog/dist_lock_manager_mock.h"
#include "mongo/s/catalog/sharding_catalog_client_impl.h"
diff --git a/src/mongo/s/sharding_uptime_reporter.cpp b/src/mongo/s/sharding_uptime_reporter.cpp
index 0b0d78bc91b..ba5f3690822 100644
--- a/src/mongo/s/sharding_uptime_reporter.cpp
+++ b/src/mongo/s/sharding_uptime_reporter.cpp
@@ -34,7 +34,7 @@
#include "mongo/db/client.h"
#include "mongo/db/server_options.h"
-#include "mongo/s/balancer/balancer_configuration.h"
+#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/catalog/type_mongos.h"
#include "mongo/s/grid.h"