summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2018-09-18 15:07:25 -0400
committerRandolph Tan <randolph@10gen.com>2018-09-26 10:23:07 -0400
commit625fa16dff719dbf6688af209c5f31913d1e794f (patch)
tree132d9c464fd7ecd22dfc9f591df961757042dcbb
parent29ed53c6e1880b89adacdb292227dec57fb78fdc (diff)
downloadmongo-625fa16dff719dbf6688af209c5f31913d1e794f.tar.gz
SERVER-36589 Reorganize libraries and fold s/transaction to s/
-rw-r--r--src/mongo/SConscript2
-rw-r--r--src/mongo/db/SConscript2
-rw-r--r--src/mongo/db/pipeline/SConscript2
-rw-r--r--src/mongo/db/pipeline/mongos_process_interface.cpp2
-rw-r--r--src/mongo/db/s/SConscript2
-rw-r--r--src/mongo/db/s/config/configsvr_drop_collection_command.cpp2
-rw-r--r--src/mongo/db/s/config/configsvr_move_primary_command.cpp2
-rw-r--r--src/mongo/db/s/config/configsvr_shard_collection_command.cpp2
-rw-r--r--src/mongo/db/s/shardsvr_shard_collection.cpp2
-rw-r--r--src/mongo/db/sessions_collection_config_server.cpp2
-rw-r--r--src/mongo/s/SConscript70
-rw-r--r--src/mongo/s/append_at_cluster_time_test.cpp (renamed from src/mongo/s/transaction/append_at_cluster_time_test.cpp)2
-rw-r--r--src/mongo/s/at_cluster_time_util.cpp (renamed from src/mongo/s/transaction/at_cluster_time_util.cpp)2
-rw-r--r--src/mongo/s/at_cluster_time_util.h (renamed from src/mongo/s/transaction/at_cluster_time_util.h)0
-rw-r--r--src/mongo/s/cluster_commands_helpers.cpp (renamed from src/mongo/s/commands/cluster_commands_helpers.cpp)4
-rw-r--r--src/mongo/s/cluster_commands_helpers.h (renamed from src/mongo/s/commands/cluster_commands_helpers.h)0
-rw-r--r--src/mongo/s/commands/SConscript14
-rw-r--r--src/mongo/s/commands/cluster_abort_transaction_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_coll_stats_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_collection_mod_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_commit_transaction_cmd.cpp4
-rw-r--r--src/mongo/s/commands/cluster_count_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_create_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_create_indexes_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_data_size_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_db_stats_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_distinct_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_drop_indexes_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_filemd5_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_find_and_modify_cmd.cpp4
-rw-r--r--src/mongo/s/commands/cluster_find_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_get_shard_version_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_killcursors_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_move_primary_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_restart_catalog_command.cpp2
-rw-r--r--src/mongo/s/commands/cluster_shard_collection_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_split_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_user_management_commands.cpp2
-rw-r--r--src/mongo/s/commands/cluster_validate_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_write_cmd.cpp2
-rw-r--r--src/mongo/s/commands/commands_public.cpp2
-rw-r--r--src/mongo/s/commands/strategy.cpp4
-rw-r--r--src/mongo/s/compute_at_cluster_time_test.cpp (renamed from src/mongo/s/transaction/compute_at_cluster_time_test.cpp)4
-rw-r--r--src/mongo/s/multi_statement_transaction_requests_sender.cpp2
-rw-r--r--src/mongo/s/query/SConscript4
-rw-r--r--src/mongo/s/query/cluster_aggregate.cpp4
-rw-r--r--src/mongo/s/query/cluster_aggregation_planner.cpp2
-rw-r--r--src/mongo/s/query/cluster_find.cpp4
-rw-r--r--src/mongo/s/query/store_possible_cursor.cpp2
-rw-r--r--src/mongo/s/sharding_task_executor.cpp1
-rw-r--r--src/mongo/s/transaction/SConscript60
-rw-r--r--src/mongo/s/transaction_router.cpp (renamed from src/mongo/s/transaction/transaction_router.cpp)4
-rw-r--r--src/mongo/s/transaction_router.h (renamed from src/mongo/s/transaction/transaction_router.h)0
-rw-r--r--src/mongo/s/transaction_router_test.cpp (renamed from src/mongo/s/transaction/transaction_router_test.cpp)2
-rw-r--r--src/mongo/s/write_ops/SConscript4
-rw-r--r--src/mongo/s/write_ops/batch_write_exec.cpp2
-rw-r--r--src/mongo/s/write_ops/batch_write_exec_test.cpp2
-rw-r--r--src/mongo/s/write_ops/chunk_manager_targeter.cpp2
60 files changed, 123 insertions, 148 deletions
diff --git a/src/mongo/SConscript b/src/mongo/SConscript
index b1705067507..7d82797d5e1 100644
--- a/src/mongo/SConscript
+++ b/src/mongo/SConscript
@@ -433,7 +433,7 @@ mongos = env.Program(
's/is_mongos',
's/sharding_egress_metadata_hook_for_mongos',
's/sharding_initialization',
- 's/transaction/router_session',
+ 's/sharding_router_api',
's/query/cluster_cursor_cleanup_job',
'transport/service_entry_point',
'transport/transport_layer_manager',
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript
index 24954cd9fd7..ad95ebc4c3c 100644
--- a/src/mongo/db/SConscript
+++ b/src/mongo/db/SConscript
@@ -1360,7 +1360,7 @@ env.Library(
'sessions_collection_sharded',
],
LIBDEPS_PRIVATE=[
- '$BUILD_DIR/mongo/s/commands/cluster_commands_helpers',
+ '$BUILD_DIR/mongo/s/sharding_router_api',
]
)
diff --git a/src/mongo/db/pipeline/SConscript b/src/mongo/db/pipeline/SConscript
index b1f4d9b06be..d32e34b061e 100644
--- a/src/mongo/db/pipeline/SConscript
+++ b/src/mongo/db/pipeline/SConscript
@@ -299,7 +299,7 @@ env.Library(
],
LIBDEPS=[
'$BUILD_DIR/mongo/s/query/async_results_merger',
- '$BUILD_DIR/mongo/s/commands/cluster_commands_helpers',
+ '$BUILD_DIR/mongo/s/sharding_router_api',
'mongo_process_common',
]
)
diff --git a/src/mongo/db/pipeline/mongos_process_interface.cpp b/src/mongo/db/pipeline/mongos_process_interface.cpp
index a410194cb2d..3bc38afc718 100644
--- a/src/mongo/db/pipeline/mongos_process_interface.cpp
+++ b/src/mongo/db/pipeline/mongos_process_interface.cpp
@@ -40,7 +40,7 @@
#include "mongo/db/s/scoped_collection_metadata.h"
#include "mongo/executor/task_executor_pool.h"
#include "mongo/s/catalog_cache.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
#include "mongo/s/query/cluster_cursor_manager.h"
#include "mongo/s/query/establish_cursors.h"
diff --git a/src/mongo/db/s/SConscript b/src/mongo/db/s/SConscript
index a150e06035f..a8ce73042ab 100644
--- a/src/mongo/db/s/SConscript
+++ b/src/mongo/db/s/SConscript
@@ -295,8 +295,8 @@ env.Library(
'$BUILD_DIR/mongo/db/index_d',
'$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
'$BUILD_DIR/mongo/db/repl/replica_set_messages',
- '$BUILD_DIR/mongo/s/commands/cluster_commands_helpers',
'$BUILD_DIR/mongo/s/commands/shared_cluster_commands',
+ '$BUILD_DIR/mongo/s/sharding_router_api',
'$BUILD_DIR/mongo/s/sharding_initialization',
'balancer',
'sharding_runtime_d',
diff --git a/src/mongo/db/s/config/configsvr_drop_collection_command.cpp b/src/mongo/db/s/config/configsvr_drop_collection_command.cpp
index 564ac04c3b5..e8860cf0572 100644
--- a/src/mongo/db/s/config/configsvr_drop_collection_command.cpp
+++ b/src/mongo/db/s/config/configsvr_drop_collection_command.cpp
@@ -40,7 +40,7 @@
#include "mongo/s/catalog/type_database.h"
#include "mongo/s/catalog_cache.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
#include "mongo/s/stale_exception.h"
#include "mongo/util/fail_point_service.h"
diff --git a/src/mongo/db/s/config/configsvr_move_primary_command.cpp b/src/mongo/db/s/config/configsvr_move_primary_command.cpp
index efc70fdd072..91869fdd005 100644
--- a/src/mongo/db/s/config/configsvr_move_primary_command.cpp
+++ b/src/mongo/db/s/config/configsvr_move_primary_command.cpp
@@ -47,7 +47,7 @@
#include "mongo/s/catalog/type_database.h"
#include "mongo/s/catalog_cache.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
#include "mongo/s/request_types/move_primary_gen.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp
index 66da612242a..788c1fe1f38 100644
--- a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp
+++ b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp
@@ -54,7 +54,7 @@
#include "mongo/s/catalog/type_shard.h"
#include "mongo/s/catalog_cache.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/config_server_client.h"
#include "mongo/s/grid.h"
#include "mongo/s/request_types/shard_collection_gen.h"
diff --git a/src/mongo/db/s/shardsvr_shard_collection.cpp b/src/mongo/db/s/shardsvr_shard_collection.cpp
index 01dd8544195..83a9623a35c 100644
--- a/src/mongo/db/s/shardsvr_shard_collection.cpp
+++ b/src/mongo/db/s/shardsvr_shard_collection.cpp
@@ -53,7 +53,7 @@
#include "mongo/s/catalog/type_database.h"
#include "mongo/s/catalog/type_shard.h"
#include "mongo/s/catalog/type_tags.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
#include "mongo/s/request_types/clone_collection_options_from_primary_shard_gen.h"
#include "mongo/s/request_types/shard_collection_gen.h"
diff --git a/src/mongo/db/sessions_collection_config_server.cpp b/src/mongo/db/sessions_collection_config_server.cpp
index ca6d3fae01e..41920462aa4 100644
--- a/src/mongo/db/sessions_collection_config_server.cpp
+++ b/src/mongo/db/sessions_collection_config_server.cpp
@@ -39,7 +39,7 @@
#include "mongo/db/operation_context.h"
#include "mongo/rpc/get_status_from_command_result.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
#include "mongo/s/request_types/shard_collection_gen.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript
index 150eb9fda70..eff2b3d14ce 100644
--- a/src/mongo/s/SConscript
+++ b/src/mongo/s/SConscript
@@ -52,6 +52,26 @@ env.Library(
)
env.Library(
+ target='sharding_router_api',
+ source=[
+ 'at_cluster_time_util.cpp',
+ 'cluster_commands_helpers.cpp',
+ 'multi_statement_transaction_requests_sender.cpp',
+ 'transaction_router.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/db/commands/txn_cmd_request',
+ '$BUILD_DIR/mongo/db/curop',
+ '$BUILD_DIR/mongo/db/logical_session_id',
+ '$BUILD_DIR/mongo/db/logical_session_id_helpers',
+ '$BUILD_DIR/mongo/db/repl/read_concern_args',
+ 'async_requests_sender',
+ 'common_s',
+ 'grid',
+ ],
+)
+
+env.Library(
target='sharding_routing_table',
source=[
'chunk.cpp',
@@ -109,17 +129,6 @@ env.Library(
)
env.Library(
- target="multi_statement_transaction_requests_sender",
- source=[
- "multi_statement_transaction_requests_sender.cpp",
- ],
- LIBDEPS=[
- "async_requests_sender",
- "$BUILD_DIR/mongo/s/transaction/router_session",
- ],
-)
-
-env.Library(
target='common_s',
source=[
'catalog/mongo_version_range.cpp',
@@ -310,6 +319,7 @@ env.Library(
'$BUILD_DIR/mongo/executor/thread_pool_task_executor',
'$BUILD_DIR/mongo/s/client/sharding_client',
'cluster_last_error_info',
+ 'sharding_router_api',
],
)
@@ -484,3 +494,41 @@ env.CppUnitTest(
'sharding_legacy_api',
]
)
+
+env.CppUnitTest(
+ target='transaction_router_test',
+ source=[
+ 'transaction_router_test.cpp',
+ ],
+ LIBDEPS=[
+ 'sharding_router_api',
+ 'sharding_router_test_fixture',
+ ]
+)
+
+env.CppUnitTest(
+ target='append_at_cluster_time_test',
+ source=[
+ 'append_at_cluster_time_test.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/db/auth/authmocks',
+ '$BUILD_DIR/mongo/db/logical_time',
+ '$BUILD_DIR/mongo/unittest/unittest',
+ 'sharding_router_api',
+ ]
+)
+
+env.CppUnitTest(
+ target='compute_at_cluster_time_test',
+ source=[
+ 'compute_at_cluster_time_test.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/db/auth/authmocks',
+ '$BUILD_DIR/mongo/db/logical_clock',
+ '$BUILD_DIR/mongo/unittest/unittest',
+ 'catalog_cache_test_fixture',
+ 'sharding_router_api',
+ ]
+)
diff --git a/src/mongo/s/transaction/append_at_cluster_time_test.cpp b/src/mongo/s/append_at_cluster_time_test.cpp
index 9422c3faf46..c65eade0c4e 100644
--- a/src/mongo/s/transaction/append_at_cluster_time_test.cpp
+++ b/src/mongo/s/append_at_cluster_time_test.cpp
@@ -32,7 +32,7 @@
#include "mongo/bson/bsonobj.h"
#include "mongo/db/logical_time.h"
-#include "mongo/s/transaction/at_cluster_time_util.h"
+#include "mongo/s/at_cluster_time_util.h"
#include "mongo/unittest/unittest.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/s/transaction/at_cluster_time_util.cpp b/src/mongo/s/at_cluster_time_util.cpp
index db1ccee124d..1ace3e9dc40 100644
--- a/src/mongo/s/transaction/at_cluster_time_util.cpp
+++ b/src/mongo/s/at_cluster_time_util.cpp
@@ -30,7 +30,7 @@
#include <boost/optional.hpp>
-#include "mongo/s/transaction/at_cluster_time_util.h"
+#include "mongo/s/at_cluster_time_util.h"
#include "mongo/db/logical_clock.h"
#include "mongo/s/grid.h"
diff --git a/src/mongo/s/transaction/at_cluster_time_util.h b/src/mongo/s/at_cluster_time_util.h
index 26c8cb3f3cd..26c8cb3f3cd 100644
--- a/src/mongo/s/transaction/at_cluster_time_util.h
+++ b/src/mongo/s/at_cluster_time_util.h
diff --git a/src/mongo/s/commands/cluster_commands_helpers.cpp b/src/mongo/s/cluster_commands_helpers.cpp
index 27fbcb5f8e6..faecc0ab52a 100644
--- a/src/mongo/s/commands/cluster_commands_helpers.cpp
+++ b/src/mongo/s/cluster_commands_helpers.cpp
@@ -32,7 +32,7 @@
#include <boost/optional.hpp>
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/db/commands.h"
#include "mongo/db/curop.h"
@@ -51,7 +51,7 @@
#include "mongo/s/request_types/create_database_gen.h"
#include "mongo/s/shard_id.h"
#include "mongo/s/stale_exception.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/transaction_router.h"
#include "mongo/util/log.h"
#include "mongo/util/scopeguard.h"
diff --git a/src/mongo/s/commands/cluster_commands_helpers.h b/src/mongo/s/cluster_commands_helpers.h
index bfe4e5abdce..bfe4e5abdce 100644
--- a/src/mongo/s/commands/cluster_commands_helpers.h
+++ b/src/mongo/s/cluster_commands_helpers.h
diff --git a/src/mongo/s/commands/SConscript b/src/mongo/s/commands/SConscript
index 5e3ba44947c..0d72376173e 100644
--- a/src/mongo/s/commands/SConscript
+++ b/src/mongo/s/commands/SConscript
@@ -5,18 +5,6 @@ Import("get_option")
env = env.Clone()
-env.Library(
- target='cluster_commands_helpers',
- source=[
- 'cluster_commands_helpers.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/curop',
- '$BUILD_DIR/mongo/s/multi_statement_transaction_requests_sender',
- '$BUILD_DIR/mongo/s/transaction/router_session',
- ],
-)
-
# These commands are linked both in MongoS and MongoD
env.Library(
target='shared_cluster_commands',
@@ -127,7 +115,7 @@ env.Library(
'$BUILD_DIR/mongo/s/query/cluster_client_cursor',
'$BUILD_DIR/mongo/s/sharding_api',
'$BUILD_DIR/mongo/s/sharding_legacy_api',
- '$BUILD_DIR/mongo/s/transaction/router_session',
+ '$BUILD_DIR/mongo/s/sharding_router_api',
'$BUILD_DIR/mongo/s/write_ops/cluster_write_op_conversion',
'$BUILD_DIR/mongo/transport/message_compressor',
'$BUILD_DIR/mongo/transport/transport_layer_common',
diff --git a/src/mongo/s/commands/cluster_abort_transaction_cmd.cpp b/src/mongo/s/commands/cluster_abort_transaction_cmd.cpp
index ee89394d920..c2d46f943e5 100644
--- a/src/mongo/s/commands/cluster_abort_transaction_cmd.cpp
+++ b/src/mongo/s/commands/cluster_abort_transaction_cmd.cpp
@@ -31,7 +31,7 @@
#include "mongo/platform/basic.h"
#include "mongo/db/commands.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
namespace mongo {
namespace {
diff --git a/src/mongo/s/commands/cluster_coll_stats_cmd.cpp b/src/mongo/s/commands/cluster_coll_stats_cmd.cpp
index 8c8bc11be8a..ce6a74ebf8b 100644
--- a/src/mongo/s/commands/cluster_coll_stats_cmd.cpp
+++ b/src/mongo/s/commands/cluster_coll_stats_cmd.cpp
@@ -32,7 +32,7 @@
#include "mongo/db/commands.h"
#include "mongo/rpc/get_status_from_command_result.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/s/commands/cluster_collection_mod_cmd.cpp b/src/mongo/s/commands/cluster_collection_mod_cmd.cpp
index 27823d3ed8d..6f36bf488fd 100644
--- a/src/mongo/s/commands/cluster_collection_mod_cmd.cpp
+++ b/src/mongo/s/commands/cluster_collection_mod_cmd.cpp
@@ -32,7 +32,7 @@
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/commands.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/util/log.h"
namespace mongo {
diff --git a/src/mongo/s/commands/cluster_commit_transaction_cmd.cpp b/src/mongo/s/commands/cluster_commit_transaction_cmd.cpp
index 784004e5633..eb4844754b8 100644
--- a/src/mongo/s/commands/cluster_commit_transaction_cmd.cpp
+++ b/src/mongo/s/commands/cluster_commit_transaction_cmd.cpp
@@ -31,8 +31,8 @@
#include "mongo/platform/basic.h"
#include "mongo/db/commands.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/cluster_commands_helpers.h"
+#include "mongo/s/transaction_router.h"
namespace mongo {
namespace {
diff --git a/src/mongo/s/commands/cluster_count_cmd.cpp b/src/mongo/s/commands/cluster_count_cmd.cpp
index 36bc7020921..9a7262d5924 100644
--- a/src/mongo/s/commands/cluster_count_cmd.cpp
+++ b/src/mongo/s/commands/cluster_count_cmd.cpp
@@ -37,7 +37,7 @@
#include "mongo/db/views/resolved_view.h"
#include "mongo/rpc/get_status_from_command_result.h"
#include "mongo/s/catalog_cache.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/commands/cluster_explain.h"
#include "mongo/s/commands/strategy.h"
#include "mongo/s/grid.h"
diff --git a/src/mongo/s/commands/cluster_create_cmd.cpp b/src/mongo/s/commands/cluster_create_cmd.cpp
index be8c8f9dd4a..75dabe1ef00 100644
--- a/src/mongo/s/commands/cluster_create_cmd.cpp
+++ b/src/mongo/s/commands/cluster_create_cmd.cpp
@@ -32,7 +32,7 @@
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/commands.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
#include "mongo/s/request_types/create_collection_gen.h"
diff --git a/src/mongo/s/commands/cluster_create_indexes_cmd.cpp b/src/mongo/s/commands/cluster_create_indexes_cmd.cpp
index 84274d6f211..d8732129758 100644
--- a/src/mongo/s/commands/cluster_create_indexes_cmd.cpp
+++ b/src/mongo/s/commands/cluster_create_indexes_cmd.cpp
@@ -31,7 +31,7 @@
#include "mongo/platform/basic.h"
#include "mongo/db/commands.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/util/log.h"
namespace mongo {
diff --git a/src/mongo/s/commands/cluster_data_size_cmd.cpp b/src/mongo/s/commands/cluster_data_size_cmd.cpp
index ba99be3c73d..b5a811a7793 100644
--- a/src/mongo/s/commands/cluster_data_size_cmd.cpp
+++ b/src/mongo/s/commands/cluster_data_size_cmd.cpp
@@ -32,7 +32,7 @@
#include "mongo/db/commands.h"
#include "mongo/rpc/get_status_from_command_result.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/s/commands/cluster_db_stats_cmd.cpp b/src/mongo/s/commands/cluster_db_stats_cmd.cpp
index 8314e5054c9..cbfc9b4b10e 100644
--- a/src/mongo/s/commands/cluster_db_stats_cmd.cpp
+++ b/src/mongo/s/commands/cluster_db_stats_cmd.cpp
@@ -32,7 +32,7 @@
#include "mongo/db/commands.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
namespace mongo {
diff --git a/src/mongo/s/commands/cluster_distinct_cmd.cpp b/src/mongo/s/commands/cluster_distinct_cmd.cpp
index 24442a4aeac..057ae37879f 100644
--- a/src/mongo/s/commands/cluster_distinct_cmd.cpp
+++ b/src/mongo/s/commands/cluster_distinct_cmd.cpp
@@ -37,7 +37,7 @@
#include "mongo/db/query/view_response_formatter.h"
#include "mongo/db/views/resolved_view.h"
#include "mongo/rpc/get_status_from_command_result.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/commands/cluster_explain.h"
#include "mongo/s/grid.h"
#include "mongo/s/query/cluster_aggregate.h"
diff --git a/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp b/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp
index 824ddf958b8..c9ece925a24 100644
--- a/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp
+++ b/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp
@@ -31,7 +31,7 @@
#include "mongo/platform/basic.h"
#include "mongo/db/commands.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/util/log.h"
namespace mongo {
diff --git a/src/mongo/s/commands/cluster_filemd5_cmd.cpp b/src/mongo/s/commands/cluster_filemd5_cmd.cpp
index 77b7897b173..bcb9d581e38 100644
--- a/src/mongo/s/commands/cluster_filemd5_cmd.cpp
+++ b/src/mongo/s/commands/cluster_filemd5_cmd.cpp
@@ -32,7 +32,7 @@
#include "mongo/db/commands.h"
#include "mongo/rpc/get_status_from_command_result.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
#include "mongo/util/log.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 b26e024682b..2832874beee 100644
--- a/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp
+++ b/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp
@@ -39,13 +39,13 @@
#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog_cache.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/commands/cluster_explain.h"
#include "mongo/s/commands/strategy.h"
#include "mongo/s/grid.h"
#include "mongo/s/multi_statement_transaction_requests_sender.h"
#include "mongo/s/stale_exception.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/transaction_router.h"
#include "mongo/s/write_ops/cluster_write.h"
#include "mongo/util/timer.h"
diff --git a/src/mongo/s/commands/cluster_find_cmd.cpp b/src/mongo/s/commands/cluster_find_cmd.cpp
index f73979ccf39..8f9300cbff6 100644
--- a/src/mongo/s/commands/cluster_find_cmd.cpp
+++ b/src/mongo/s/commands/cluster_find_cmd.cpp
@@ -39,7 +39,7 @@
#include "mongo/db/views/resolved_view.h"
#include "mongo/rpc/get_status_from_command_result.h"
#include "mongo/s/catalog_cache.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/commands/cluster_explain.h"
#include "mongo/s/grid.h"
#include "mongo/s/query/cluster_aggregate.h"
diff --git a/src/mongo/s/commands/cluster_get_shard_version_cmd.cpp b/src/mongo/s/commands/cluster_get_shard_version_cmd.cpp
index f2bd4975fc8..fbbf4511c47 100644
--- a/src/mongo/s/commands/cluster_get_shard_version_cmd.cpp
+++ b/src/mongo/s/commands/cluster_get_shard_version_cmd.cpp
@@ -36,7 +36,7 @@
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/commands.h"
#include "mongo/s/catalog_cache.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/database_version_gen.h"
#include "mongo/s/grid.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/s/commands/cluster_killcursors_cmd.cpp b/src/mongo/s/commands/cluster_killcursors_cmd.cpp
index 71ac92b7af2..aff708870c0 100644
--- a/src/mongo/s/commands/cluster_killcursors_cmd.cpp
+++ b/src/mongo/s/commands/cluster_killcursors_cmd.cpp
@@ -32,7 +32,7 @@
#include "mongo/db/commands/killcursors_common.h"
#include "mongo/s/grid.h"
#include "mongo/s/query/cluster_cursor_manager.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/transaction_router.h"
namespace mongo {
namespace {
diff --git a/src/mongo/s/commands/cluster_map_reduce_cmd.cpp b/src/mongo/s/commands/cluster_map_reduce_cmd.cpp
index 71b63d8b0ef..72d6f6971d7 100644
--- a/src/mongo/s/commands/cluster_map_reduce_cmd.cpp
+++ b/src/mongo/s/commands/cluster_map_reduce_cmd.cpp
@@ -48,7 +48,7 @@
#include "mongo/s/catalog_cache.h"
#include "mongo/s/client/shard_connection.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/commands/strategy.h"
#include "mongo/s/grid.h"
#include "mongo/s/request_types/shard_collection_gen.h"
diff --git a/src/mongo/s/commands/cluster_move_chunk_cmd.cpp b/src/mongo/s/commands/cluster_move_chunk_cmd.cpp
index d6b53ca5748..11320d106fd 100644
--- a/src/mongo/s/commands/cluster_move_chunk_cmd.cpp
+++ b/src/mongo/s/commands/cluster_move_chunk_cmd.cpp
@@ -41,7 +41,7 @@
#include "mongo/s/balancer_configuration.h"
#include "mongo/s/catalog_cache.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/config_server_client.h"
#include "mongo/s/grid.h"
#include "mongo/s/request_types/migration_secondary_throttle_options.h"
diff --git a/src/mongo/s/commands/cluster_move_primary_cmd.cpp b/src/mongo/s/commands/cluster_move_primary_cmd.cpp
index 7dcc1a6f101..bbc9d304595 100644
--- a/src/mongo/s/commands/cluster_move_primary_cmd.cpp
+++ b/src/mongo/s/commands/cluster_move_primary_cmd.cpp
@@ -41,7 +41,7 @@
#include "mongo/s/catalog/type_shard.h"
#include "mongo/s/catalog_cache.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
#include "mongo/s/request_types/move_primary_gen.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/s/commands/cluster_restart_catalog_command.cpp b/src/mongo/s/commands/cluster_restart_catalog_command.cpp
index 814846afdbc..56efb0ba006 100644
--- a/src/mongo/s/commands/cluster_restart_catalog_command.cpp
+++ b/src/mongo/s/commands/cluster_restart_catalog_command.cpp
@@ -30,7 +30,7 @@
#include "mongo/db/commands.h"
#include "mongo/db/commands/test_commands_enabled.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
namespace mongo {
namespace {
diff --git a/src/mongo/s/commands/cluster_shard_collection_cmd.cpp b/src/mongo/s/commands/cluster_shard_collection_cmd.cpp
index 1875a369251..6a23acf60e5 100644
--- a/src/mongo/s/commands/cluster_shard_collection_cmd.cpp
+++ b/src/mongo/s/commands/cluster_shard_collection_cmd.cpp
@@ -54,7 +54,7 @@
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/catalog_cache.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/config_server_client.h"
#include "mongo/s/grid.h"
#include "mongo/s/request_types/migration_secondary_throttle_options.h"
diff --git a/src/mongo/s/commands/cluster_split_cmd.cpp b/src/mongo/s/commands/cluster_split_cmd.cpp
index af5cdebcba2..2b73b297b1f 100644
--- a/src/mongo/s/commands/cluster_split_cmd.cpp
+++ b/src/mongo/s/commands/cluster_split_cmd.cpp
@@ -41,7 +41,7 @@
#include "mongo/db/field_parser.h"
#include "mongo/s/catalog_cache.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
#include "mongo/s/shard_util.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/s/commands/cluster_user_management_commands.cpp b/src/mongo/s/commands/cluster_user_management_commands.cpp
index 244bcf4a572..0cd46d1a192 100644
--- a/src/mongo/s/commands/cluster_user_management_commands.cpp
+++ b/src/mongo/s/commands/cluster_user_management_commands.cpp
@@ -42,7 +42,7 @@
#include "mongo/rpc/write_concern_error_detail.h"
#include "mongo/s/catalog/type_shard.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
namespace mongo {
diff --git a/src/mongo/s/commands/cluster_validate_cmd.cpp b/src/mongo/s/commands/cluster_validate_cmd.cpp
index 505c191c2c0..f0578912b2e 100644
--- a/src/mongo/s/commands/cluster_validate_cmd.cpp
+++ b/src/mongo/s/commands/cluster_validate_cmd.cpp
@@ -32,7 +32,7 @@
#include "mongo/db/commands.h"
#include "mongo/rpc/get_status_from_command_result.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
namespace mongo {
diff --git a/src/mongo/s/commands/cluster_write_cmd.cpp b/src/mongo/s/commands/cluster_write_cmd.cpp
index 8a2bc30fa24..92d8565ecf0 100644
--- a/src/mongo/s/commands/cluster_write_cmd.cpp
+++ b/src/mongo/s/commands/cluster_write_cmd.cpp
@@ -45,7 +45,7 @@
#include "mongo/s/commands/cluster_explain.h"
#include "mongo/s/grid.h"
#include "mongo/s/multi_statement_transaction_requests_sender.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/transaction_router.h"
#include "mongo/s/write_ops/batched_command_request.h"
#include "mongo/s/write_ops/batched_command_response.h"
#include "mongo/s/write_ops/chunk_manager_targeter.h"
diff --git a/src/mongo/s/commands/commands_public.cpp b/src/mongo/s/commands/commands_public.cpp
index 9aee19e9b97..ce72688cb62 100644
--- a/src/mongo/s/commands/commands_public.cpp
+++ b/src/mongo/s/commands/commands_public.cpp
@@ -40,7 +40,7 @@
#include "mongo/db/commands/rename_collection.h"
#include "mongo/executor/task_executor_pool.h"
#include "mongo/rpc/get_status_from_command_result.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/commands/cluster_explain.h"
#include "mongo/s/grid.h"
#include "mongo/s/query/store_possible_cursor.h"
diff --git a/src/mongo/s/commands/strategy.cpp b/src/mongo/s/commands/strategy.cpp
index 8e1f5785915..8d07a963fd1 100644
--- a/src/mongo/s/commands/strategy.cpp
+++ b/src/mongo/s/commands/strategy.cpp
@@ -69,13 +69,13 @@
#include "mongo/s/client/parallel.h"
#include "mongo/s/client/shard_connection.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/commands/cluster_explain.h"
#include "mongo/s/grid.h"
#include "mongo/s/query/cluster_cursor_manager.h"
#include "mongo/s/query/cluster_find.h"
#include "mongo/s/stale_exception.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/transaction_router.h"
#include "mongo/util/fail_point_service.h"
#include "mongo/util/log.h"
#include "mongo/util/mongoutils/str.h"
diff --git a/src/mongo/s/transaction/compute_at_cluster_time_test.cpp b/src/mongo/s/compute_at_cluster_time_test.cpp
index 61efcabe61d..088ad79da2c 100644
--- a/src/mongo/s/transaction/compute_at_cluster_time_test.cpp
+++ b/src/mongo/s/compute_at_cluster_time_test.cpp
@@ -33,12 +33,12 @@
#include "mongo/client/remote_command_targeter_mock.h"
#include "mongo/db/logical_clock.h"
#include "mongo/db/logical_time.h"
+#include "mongo/s/at_cluster_time_util.h"
#include "mongo/s/catalog_cache_test_fixture.h"
#include "mongo/s/client/shard_remote.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/shard_id.h"
#include "mongo/s/sharding_router_test_fixture.h"
-#include "mongo/s/transaction/at_cluster_time_util.h"
#include "mongo/unittest/unittest.h"
namespace mongo {
diff --git a/src/mongo/s/multi_statement_transaction_requests_sender.cpp b/src/mongo/s/multi_statement_transaction_requests_sender.cpp
index ea97e48d8dc..432e2dc2da0 100644
--- a/src/mongo/s/multi_statement_transaction_requests_sender.cpp
+++ b/src/mongo/s/multi_statement_transaction_requests_sender.cpp
@@ -30,7 +30,7 @@
#include "mongo/s/multi_statement_transaction_requests_sender.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/transaction_router.h"
namespace mongo {
diff --git a/src/mongo/s/query/SConscript b/src/mongo/s/query/SConscript
index abd8335a085..e156eafc303 100644
--- a/src/mongo/s/query/SConscript
+++ b/src/mongo/s/query/SConscript
@@ -15,7 +15,7 @@ env.Library(
'$BUILD_DIR/mongo/db/curop',
'$BUILD_DIR/mongo/db/curop_failpoint_helpers',
'$BUILD_DIR/mongo/db/query/query_common',
- '$BUILD_DIR/mongo/s/commands/cluster_commands_helpers',
+ '$BUILD_DIR/mongo/s/sharding_router_api',
"cluster_client_cursor",
"cluster_cursor_cleanup_job",
"store_possible_cursor",
@@ -101,9 +101,9 @@ env.Library(
"$BUILD_DIR/mongo/db/query/command_request_response",
"$BUILD_DIR/mongo/db/query/query_common",
"$BUILD_DIR/mongo/executor/task_executor_interface",
- "$BUILD_DIR/mongo/s/multi_statement_transaction_requests_sender",
"$BUILD_DIR/mongo/s/client/sharding_client",
'$BUILD_DIR/mongo/s/catalog/sharding_catalog_client_impl',
+ "$BUILD_DIR/mongo/s/sharding_router_api",
],
)
diff --git a/src/mongo/s/query/cluster_aggregate.cpp b/src/mongo/s/query/cluster_aggregate.cpp
index 6a0bd6cc005..ba269885645 100644
--- a/src/mongo/s/query/cluster_aggregate.cpp
+++ b/src/mongo/s/query/cluster_aggregate.cpp
@@ -58,7 +58,7 @@
#include "mongo/rpc/get_status_from_command_result.h"
#include "mongo/s/catalog_cache.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
#include "mongo/s/query/cluster_aggregation_planner.h"
#include "mongo/s/query/cluster_client_cursor_impl.h"
@@ -69,7 +69,7 @@
#include "mongo/s/query/router_stage_pipeline.h"
#include "mongo/s/query/store_possible_cursor.h"
#include "mongo/s/stale_exception.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/transaction_router.h"
#include "mongo/util/fail_point.h"
#include "mongo/util/log.h"
#include "mongo/util/net/socket_utils.h"
diff --git a/src/mongo/s/query/cluster_aggregation_planner.cpp b/src/mongo/s/query/cluster_aggregation_planner.cpp
index 46452d121a3..451333236e6 100644
--- a/src/mongo/s/query/cluster_aggregation_planner.cpp
+++ b/src/mongo/s/query/cluster_aggregation_planner.cpp
@@ -50,7 +50,7 @@
#include "mongo/s/query/router_stage_skip.h"
#include "mongo/s/shard_id.h"
#include "mongo/s/shard_key_pattern.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/transaction_router.h"
namespace mongo {
namespace cluster_aggregation_planner {
diff --git a/src/mongo/s/query/cluster_find.cpp b/src/mongo/s/query/cluster_find.cpp
index 19ae450ff3e..5621ba5150e 100644
--- a/src/mongo/s/query/cluster_find.cpp
+++ b/src/mongo/s/query/cluster_find.cpp
@@ -52,7 +52,7 @@
#include "mongo/platform/overflow_arithmetic.h"
#include "mongo/s/catalog_cache.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
#include "mongo/s/query/async_results_merger.h"
#include "mongo/s/query/cluster_client_cursor_impl.h"
@@ -61,7 +61,7 @@
#include "mongo/s/query/establish_cursors.h"
#include "mongo/s/query/store_possible_cursor.h"
#include "mongo/s/stale_exception.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/transaction_router.h"
#include "mongo/stdx/memory.h"
#include "mongo/util/fail_point_service.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/s/query/store_possible_cursor.cpp b/src/mongo/s/query/store_possible_cursor.cpp
index b50177ba246..f3f58befd9c 100644
--- a/src/mongo/s/query/store_possible_cursor.cpp
+++ b/src/mongo/s/query/store_possible_cursor.cpp
@@ -41,7 +41,7 @@
#include "mongo/s/query/cluster_client_cursor_params.h"
#include "mongo/s/query/cluster_cursor_manager.h"
#include "mongo/s/shard_id.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/transaction_router.h"
namespace mongo {
diff --git a/src/mongo/s/sharding_task_executor.cpp b/src/mongo/s/sharding_task_executor.cpp
index b8b890e11ef..7a25805d05b 100644
--- a/src/mongo/s/sharding_task_executor.cpp
+++ b/src/mongo/s/sharding_task_executor.cpp
@@ -44,6 +44,7 @@
#include "mongo/s/cluster_last_error_info.h"
#include "mongo/s/grid.h"
#include "mongo/s/is_mongos.h"
+#include "mongo/s/transaction_router.h"
#include "mongo/util/log.h"
#include "mongo/util/scopeguard.h"
diff --git a/src/mongo/s/transaction/SConscript b/src/mongo/s/transaction/SConscript
deleted file mode 100644
index 1bdc7aa8d28..00000000000
--- a/src/mongo/s/transaction/SConscript
+++ /dev/null
@@ -1,60 +0,0 @@
-# -*- mode: python -*-
-
-Import("env")
-
-env = env.Clone()
-
-env.Library(
- target='router_session',
- source=[
- 'transaction_router.cpp',
- 'at_cluster_time_util.cpp'
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/commands/txn_cmd_request',
- '$BUILD_DIR/mongo/db/logical_session_id',
- '$BUILD_DIR/mongo/db/logical_session_id_helpers',
- '$BUILD_DIR/mongo/db/repl/read_concern_args',
- '$BUILD_DIR/mongo/s/common_s',
- '$BUILD_DIR/mongo/s/grid',
- ],
-)
-
-env.CppUnitTest(
- target='transaction_router_test',
- source=[
- 'transaction_router_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/s/sharding_router_test_fixture',
- 'router_session',
- ]
-)
-
-env.CppUnitTest(
- target='append_at_cluster_time_test',
- source=[
- 'append_at_cluster_time_test.cpp',
- ],
- LIBDEPS=[
- 'router_session',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/logical_time',
- '$BUILD_DIR/mongo/unittest/unittest',
- ]
-)
-
-env.CppUnitTest(
- target='compute_at_cluster_time_test',
- source=[
- 'compute_at_cluster_time_test.cpp',
- ],
- LIBDEPS=[
- 'router_session',
- '$BUILD_DIR/mongo/s/catalog_cache_test_fixture',
- '$BUILD_DIR/mongo/s/commands/cluster_commands_helpers',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/logical_clock',
- '$BUILD_DIR/mongo/unittest/unittest',
- ]
-)
diff --git a/src/mongo/s/transaction/transaction_router.cpp b/src/mongo/s/transaction_router.cpp
index 94f8e0377cd..5e471237947 100644
--- a/src/mongo/s/transaction/transaction_router.cpp
+++ b/src/mongo/s/transaction_router.cpp
@@ -30,7 +30,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/transaction_router.h"
#include "mongo/client/read_preference.h"
#include "mongo/db/commands/txn_cmds_gen.h"
@@ -38,8 +38,8 @@
#include "mongo/db/logical_clock.h"
#include "mongo/db/logical_session_id.h"
#include "mongo/db/repl/read_concern_args.h"
+#include "mongo/s/at_cluster_time_util.h"
#include "mongo/s/grid.h"
-#include "mongo/s/transaction/at_cluster_time_util.h"
#include "mongo/stdx/unordered_map.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/s/transaction/transaction_router.h b/src/mongo/s/transaction_router.h
index f8ae1a2f349..f8ae1a2f349 100644
--- a/src/mongo/s/transaction/transaction_router.h
+++ b/src/mongo/s/transaction_router.h
diff --git a/src/mongo/s/transaction/transaction_router_test.cpp b/src/mongo/s/transaction_router_test.cpp
index c076648cf05..b5a8439ed20 100644
--- a/src/mongo/s/transaction/transaction_router_test.cpp
+++ b/src/mongo/s/transaction_router_test.cpp
@@ -31,7 +31,7 @@
#include "mongo/client/remote_command_targeter_mock.h"
#include "mongo/db/logical_clock.h"
#include "mongo/s/sharding_router_test_fixture.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/transaction_router.h"
#include "mongo/unittest/death_test.h"
#include "mongo/unittest/unittest.h"
diff --git a/src/mongo/s/write_ops/SConscript b/src/mongo/s/write_ops/SConscript
index 8f1faef11fe..3de864d1f8e 100644
--- a/src/mongo/s/write_ops/SConscript
+++ b/src/mongo/s/write_ops/SConscript
@@ -32,9 +32,7 @@ env.Library(
'write_op.cpp',
],
LIBDEPS=[
- '$BUILD_DIR/mongo/s/multi_statement_transaction_requests_sender',
- '$BUILD_DIR/mongo/s/commands/cluster_commands_helpers',
- '$BUILD_DIR/mongo/s/transaction/router_session',
+ '$BUILD_DIR/mongo/s/sharding_router_api',
'batch_write_types',
],
)
diff --git a/src/mongo/s/write_ops/batch_write_exec.cpp b/src/mongo/s/write_ops/batch_write_exec.cpp
index 9c88ce9d8ea..d206195e9cc 100644
--- a/src/mongo/s/write_ops/batch_write_exec.cpp
+++ b/src/mongo/s/write_ops/batch_write_exec.cpp
@@ -42,7 +42,7 @@
#include "mongo/s/client/shard_registry.h"
#include "mongo/s/grid.h"
#include "mongo/s/multi_statement_transaction_requests_sender.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/transaction_router.h"
#include "mongo/s/write_ops/batch_write_op.h"
#include "mongo/s/write_ops/write_error_detail.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/s/write_ops/batch_write_exec_test.cpp b/src/mongo/s/write_ops/batch_write_exec_test.cpp
index 0ea95d1d4fe..0dee3157e48 100644
--- a/src/mongo/s/write_ops/batch_write_exec_test.cpp
+++ b/src/mongo/s/write_ops/batch_write_exec_test.cpp
@@ -35,7 +35,7 @@
#include "mongo/s/catalog/type_shard.h"
#include "mongo/s/client/shard_registry.h"
#include "mongo/s/sharding_router_test_fixture.h"
-#include "mongo/s/transaction/transaction_router.h"
+#include "mongo/s/transaction_router.h"
#include "mongo/s/write_ops/batch_write_exec.h"
#include "mongo/s/write_ops/batched_command_request.h"
#include "mongo/s/write_ops/batched_command_response.h"
diff --git a/src/mongo/s/write_ops/chunk_manager_targeter.cpp b/src/mongo/s/write_ops/chunk_manager_targeter.cpp
index 2551a9b8b4c..54358656aaf 100644
--- a/src/mongo/s/write_ops/chunk_manager_targeter.cpp
+++ b/src/mongo/s/write_ops/chunk_manager_targeter.cpp
@@ -36,7 +36,7 @@
#include "mongo/db/query/canonical_query.h"
#include "mongo/db/query/collation/collation_index_key.h"
#include "mongo/s/client/shard_registry.h"
-#include "mongo/s/commands/cluster_commands_helpers.h"
+#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/grid.h"
#include "mongo/s/shard_key_pattern.h"
#include "mongo/util/log.h"