summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/SConscript41
-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/SConscript44
-rw-r--r--src/mongo/db/s/sharding_initialization_mongod.cpp3
-rw-r--r--src/mongo/db/s/transaction_coordinator.cpp (renamed from src/mongo/db/transaction_coordinator.cpp)6
-rw-r--r--src/mongo/db/s/transaction_coordinator.h (renamed from src/mongo/db/transaction_coordinator.h)2
-rw-r--r--src/mongo/db/s/transaction_coordinator_catalog.cpp (renamed from src/mongo/db/transaction_coordinator_catalog.cpp)2
-rw-r--r--src/mongo/db/s/transaction_coordinator_catalog.h (renamed from src/mongo/db/transaction_coordinator_catalog.h)4
-rw-r--r--src/mongo/db/s/transaction_coordinator_catalog_test.cpp (renamed from src/mongo/db/transaction_coordinator_catalog_test.cpp)2
-rw-r--r--src/mongo/db/s/transaction_coordinator_document.idl (renamed from src/mongo/db/transaction_coordinator_document.idl)2
-rw-r--r--src/mongo/db/s/transaction_coordinator_driver.cpp (renamed from src/mongo/db/transaction_coordinator_driver.cpp)8
-rw-r--r--src/mongo/db/s/transaction_coordinator_driver.h (renamed from src/mongo/db/transaction_coordinator_driver.h)7
-rw-r--r--src/mongo/db/s/transaction_coordinator_factory.cpp (renamed from src/mongo/db/transaction_coordinator_factory.cpp)8
-rw-r--r--src/mongo/db/s/transaction_coordinator_factory.h (renamed from src/mongo/db/transaction_coordinator_factory.h)2
-rw-r--r--src/mongo/db/s/transaction_coordinator_factory_mongod.cpp (renamed from src/mongo/db/transaction_coordinator_factory_mongod.cpp)8
-rw-r--r--src/mongo/db/s/transaction_coordinator_futures_util.cpp (renamed from src/mongo/db/transaction_coordinator_futures_util.cpp)2
-rw-r--r--src/mongo/db/s/transaction_coordinator_futures_util.h (renamed from src/mongo/db/transaction_coordinator_futures_util.h)1
-rw-r--r--src/mongo/db/s/transaction_coordinator_futures_util_test.cpp (renamed from src/mongo/db/transaction_coordinator_futures_util_test.cpp)2
-rw-r--r--src/mongo/db/s/transaction_coordinator_service.cpp (renamed from src/mongo/db/transaction_coordinator_service.cpp)4
-rw-r--r--src/mongo/db/s/transaction_coordinator_service.h (renamed from src/mongo/db/transaction_coordinator_service.h)2
-rw-r--r--src/mongo/db/s/transaction_coordinator_service_test.cpp (renamed from src/mongo/db/transaction_coordinator_service_test.cpp)4
-rw-r--r--src/mongo/db/s/transaction_coordinator_test.cpp (renamed from src/mongo/db/transaction_coordinator_test.cpp)4
-rw-r--r--src/mongo/db/s/transaction_coordinator_test_fixture.cpp (renamed from src/mongo/db/transaction_coordinator_test_fixture.cpp)2
-rw-r--r--src/mongo/db/s/transaction_coordinator_test_fixture.h (renamed from src/mongo/db/transaction_coordinator_test_fixture.h)2
-rw-r--r--src/mongo/db/s/txn_two_phase_commit_cmds.cpp3
-rw-r--r--src/mongo/db/service_entry_point_common.cpp2
-rw-r--r--src/mongo/embedded/transaction_coordinator_factory_embedded.cpp4
28 files changed, 90 insertions, 84 deletions
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript
index 0b2bff17ac8..0d610ab5aa0 100644
--- a/src/mongo/db/SConscript
+++ b/src/mongo/db/SConscript
@@ -668,29 +668,6 @@ env.Library(
)
env.Library(
- target='transaction_coordinator',
- source=[
- 'transaction_coordinator_catalog.cpp',
- 'transaction_coordinator_driver.cpp',
- 'transaction_coordinator_factory_mongod.cpp',
- 'transaction_coordinator_futures_util.cpp',
- 'transaction_coordinator_service.cpp',
- 'transaction_coordinator.cpp',
- env.Idlc('transaction_coordinator_document.idl')[0],
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- 'catalog_raii',
- 'rw_concern_d',
- ],
- LIBDEPS_PRIVATE=[
- '$BUILD_DIR/mongo/db/commands/txn_cmd_request',
- '$BUILD_DIR/mongo/s/async_requests_sender',
- '$BUILD_DIR/mongo/s/grid',
- ]
-)
-
-env.Library(
target='session_catalog',
source=[
'session_catalog.cpp',
@@ -712,7 +689,6 @@ env.Library(
'server_transactions_metrics.cpp',
'session_catalog_mongod.cpp',
'single_transaction_stats.cpp',
- 'transaction_coordinator_factory.cpp',
'transaction_history_iterator.cpp',
'transaction_metrics_observer.cpp',
'transaction_participant.cpp',
@@ -748,23 +724,6 @@ env.Library(
)
env.CppUnitTest(
- target='transaction_coordinator_test',
- source=[
- 'transaction_coordinator_catalog_test.cpp',
- 'transaction_coordinator_futures_util_test.cpp',
- 'transaction_coordinator_service_test.cpp',
- 'transaction_coordinator_test_fixture.cpp',
- 'transaction_coordinator_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/s/catalog/sharding_catalog_client_mock',
- '$BUILD_DIR/mongo/s/shard_server_test_fixture',
- 'auth/authmocks',
- 'transaction_coordinator',
- ],
-)
-
-env.CppUnitTest(
target='catalog_raii_test',
source=[
'catalog_raii_test.cpp',
diff --git a/src/mongo/db/repl/SConscript b/src/mongo/db/repl/SConscript
index 03481453497..d14ac46e152 100644
--- a/src/mongo/db/repl/SConscript
+++ b/src/mongo/db/repl/SConscript
@@ -1612,7 +1612,6 @@ env.Library(
'$BUILD_DIR/mongo/db/service_context',
'$BUILD_DIR/mongo/db/stats/counters',
'$BUILD_DIR/mongo/db/system_index',
- '$BUILD_DIR/mongo/db/transaction_coordinator',
'$BUILD_DIR/mongo/rpc/client_metadata',
'$BUILD_DIR/mongo/util/fail_point',
'bgsync',
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 e956b342c9c..2ce1ae9e438 100644
--- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
@@ -76,13 +76,13 @@
#include "mongo/db/s/periodic_balancer_config_refresher.h"
#include "mongo/db/s/sharding_initialization_mongod.h"
#include "mongo/db/s/sharding_state_recovery.h"
+#include "mongo/db/s/transaction_coordinator_service.h"
#include "mongo/db/server_options.h"
#include "mongo/db/server_parameters.h"
#include "mongo/db/service_context.h"
#include "mongo/db/session_catalog_mongod.h"
#include "mongo/db/storage/storage_engine.h"
#include "mongo/db/system_index.h"
-#include "mongo/db/transaction_coordinator_service.h"
#include "mongo/executor/network_connection_hook.h"
#include "mongo/executor/network_interface.h"
#include "mongo/executor/network_interface_factory.h"
diff --git a/src/mongo/db/s/SConscript b/src/mongo/db/s/SConscript
index d35c69de259..f9f93444cd4 100644
--- a/src/mongo/db/s/SConscript
+++ b/src/mongo/db/s/SConscript
@@ -18,6 +18,7 @@ env.Library(
'sharded_connection_info.cpp',
'sharding_migration_critical_section.cpp',
'sharding_state.cpp',
+ 'transaction_coordinator_factory.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
@@ -77,7 +78,6 @@ env.Library(
'$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
'$BUILD_DIR/mongo/db/rw_concern_d',
'$BUILD_DIR/mongo/db/storage/remove_saver',
- '$BUILD_DIR/mongo/db/transaction_coordinator',
'$BUILD_DIR/mongo/s/client/shard_local',
'$BUILD_DIR/mongo/s/sharding_initialization',
'chunk_splitter',
@@ -85,6 +85,7 @@ env.Library(
'sharding_api_d',
'sharding_catalog_manager',
'sharding_logging',
+ 'transaction_coordinator',
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/db/session_catalog',
@@ -115,6 +116,28 @@ env.Library(
)
env.Library(
+ target='transaction_coordinator',
+ source=[
+ 'transaction_coordinator_catalog.cpp',
+ 'transaction_coordinator_driver.cpp',
+ 'transaction_coordinator_factory_mongod.cpp',
+ 'transaction_coordinator_futures_util.cpp',
+ 'transaction_coordinator_service.cpp',
+ 'transaction_coordinator.cpp',
+ env.Idlc('transaction_coordinator_document.idl')[0],
+ ],
+ LIBDEPS_PRIVATE=[
+ '$BUILD_DIR/mongo/db/catalog_raii',
+ '$BUILD_DIR/mongo/db/commands/txn_cmd_request',
+ '$BUILD_DIR/mongo/db/dbdirectclient',
+ '$BUILD_DIR/mongo/db/rw_concern_d',
+ '$BUILD_DIR/mongo/executor/task_executor_pool',
+ '$BUILD_DIR/mongo/s/grid',
+ 'sharding_api_d',
+ ]
+)
+
+env.Library(
target='chunk_splitter',
source=[
'chunk_split_state_driver.cpp',
@@ -276,7 +299,6 @@ env.Library(
'config/configsvr_shard_collection_command.cpp',
'config/configsvr_split_chunk_command.cpp',
'config/configsvr_update_zone_key_range_command.cpp',
- 'txn_two_phase_commit_cmds.cpp',
'flush_database_cache_updates_command.cpp',
'flush_routing_table_cache_updates_command.cpp',
'get_database_version_command.cpp',
@@ -292,6 +314,7 @@ env.Library(
'shardsvr_shard_collection.cpp',
'split_chunk_command.cpp',
'split_vector_command.cpp',
+ 'txn_two_phase_commit_cmds.cpp',
'unset_sharding_command.cpp',
'wait_for_ongoing_chunk_splits_command.cpp',
],
@@ -382,6 +405,23 @@ env.CppUnitTest(
)
env.CppUnitTest(
+ target='transaction_coordinator_test',
+ source=[
+ 'transaction_coordinator_catalog_test.cpp',
+ 'transaction_coordinator_futures_util_test.cpp',
+ 'transaction_coordinator_service_test.cpp',
+ 'transaction_coordinator_test_fixture.cpp',
+ 'transaction_coordinator_test.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/db/auth/authmocks',
+ '$BUILD_DIR/mongo/s/catalog/sharding_catalog_client_mock',
+ '$BUILD_DIR/mongo/s/shard_server_test_fixture',
+ 'transaction_coordinator',
+ ],
+)
+
+env.CppUnitTest(
target='session_catalog_migration_source_test',
source=[
'session_catalog_migration_source_test.cpp',
diff --git a/src/mongo/db/s/sharding_initialization_mongod.cpp b/src/mongo/db/s/sharding_initialization_mongod.cpp
index f2be7485319..276539437db 100644
--- a/src/mongo/db/s/sharding_initialization_mongod.cpp
+++ b/src/mongo/db/s/sharding_initialization_mongod.cpp
@@ -34,7 +34,6 @@
#include "mongo/db/s/sharding_initialization_mongod.h"
-#include "mongo/base/status.h"
#include "mongo/client/connection_string.h"
#include "mongo/client/global_conn_pool.h"
#include "mongo/client/remote_command_targeter.h"
@@ -53,8 +52,8 @@
#include "mongo/db/s/read_only_catalog_cache_loader.h"
#include "mongo/db/s/shard_server_catalog_cache_loader.h"
#include "mongo/db/s/sharding_config_optime_gossip.h"
+#include "mongo/db/s/transaction_coordinator_service.h"
#include "mongo/db/server_options.h"
-#include "mongo/db/transaction_coordinator_service.h"
#include "mongo/executor/task_executor_pool.h"
#include "mongo/rpc/metadata/egress_metadata_hook_list.h"
#include "mongo/s/catalog_cache.h"
diff --git a/src/mongo/db/transaction_coordinator.cpp b/src/mongo/db/s/transaction_coordinator.cpp
index df00c708d4a..9410d5cfafe 100644
--- a/src/mongo/db/transaction_coordinator.cpp
+++ b/src/mongo/db/s/transaction_coordinator.cpp
@@ -32,11 +32,11 @@
#include "mongo/platform/basic.h"
-#include "mongo/db/transaction_coordinator.h"
+#include "mongo/db/s/transaction_coordinator.h"
#include "mongo/db/logical_clock.h"
-#include "mongo/db/transaction_coordinator_document_gen.h"
-#include "mongo/db/transaction_coordinator_futures_util.h"
+#include "mongo/db/s/transaction_coordinator_document_gen.h"
+#include "mongo/db/s/transaction_coordinator_futures_util.h"
#include "mongo/util/log.h"
namespace mongo {
diff --git a/src/mongo/db/transaction_coordinator.h b/src/mongo/db/s/transaction_coordinator.h
index 0832c38feaa..bd1c2bf9396 100644
--- a/src/mongo/db/transaction_coordinator.h
+++ b/src/mongo/db/s/transaction_coordinator.h
@@ -32,7 +32,7 @@
#include <vector>
-#include "mongo/db/transaction_coordinator_driver.h"
+#include "mongo/db/s/transaction_coordinator_driver.h"
#include "mongo/logger/logstream_builder.h"
namespace mongo {
diff --git a/src/mongo/db/transaction_coordinator_catalog.cpp b/src/mongo/db/s/transaction_coordinator_catalog.cpp
index 8ebc71726a1..8debafd367b 100644
--- a/src/mongo/db/transaction_coordinator_catalog.cpp
+++ b/src/mongo/db/s/transaction_coordinator_catalog.cpp
@@ -32,7 +32,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/db/transaction_coordinator_catalog.h"
+#include "mongo/db/s/transaction_coordinator_catalog.h"
#include "mongo/util/fail_point_service.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/db/transaction_coordinator_catalog.h b/src/mongo/db/s/transaction_coordinator_catalog.h
index 5be509fde1e..6ff12b45b6b 100644
--- a/src/mongo/db/transaction_coordinator_catalog.h
+++ b/src/mongo/db/s/transaction_coordinator_catalog.h
@@ -34,10 +34,8 @@
#include <map>
#include "mongo/base/disallow_copying.h"
-#include "mongo/db/operation_context.h"
-#include "mongo/db/transaction_coordinator.h"
+#include "mongo/db/s/transaction_coordinator.h"
#include "mongo/stdx/condition_variable.h"
-#include "mongo/stdx/mutex.h"
#include "mongo/util/concurrency/with_lock.h"
namespace mongo {
diff --git a/src/mongo/db/transaction_coordinator_catalog_test.cpp b/src/mongo/db/s/transaction_coordinator_catalog_test.cpp
index 57fcca2831d..cffa0376efb 100644
--- a/src/mongo/db/transaction_coordinator_catalog_test.cpp
+++ b/src/mongo/db/s/transaction_coordinator_catalog_test.cpp
@@ -30,7 +30,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/db/transaction_coordinator_catalog.h"
+#include "mongo/db/s/transaction_coordinator_catalog.h"
#include "mongo/s/shard_server_test_fixture.h"
#include "mongo/unittest/death_test.h"
#include "mongo/unittest/unittest.h"
diff --git a/src/mongo/db/transaction_coordinator_document.idl b/src/mongo/db/s/transaction_coordinator_document.idl
index fdf4aed5cc6..c7885075073 100644
--- a/src/mongo/db/transaction_coordinator_document.idl
+++ b/src/mongo/db/s/transaction_coordinator_document.idl
@@ -30,7 +30,7 @@ global:
cpp_namespace: "mongo"
cpp_includes:
- "mongo/db/logical_session_id.h"
- - "mongo/db/transaction_coordinator.h"
+ - "mongo/db/s/transaction_coordinator.h"
imports:
- "mongo/idl/basic_types.idl"
diff --git a/src/mongo/db/transaction_coordinator_driver.cpp b/src/mongo/db/s/transaction_coordinator_driver.cpp
index 3af5d5b2695..919b151c3bd 100644
--- a/src/mongo/db/transaction_coordinator_driver.cpp
+++ b/src/mongo/db/s/transaction_coordinator_driver.cpp
@@ -32,7 +32,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/db/transaction_coordinator_driver.h"
+#include "mongo/db/s/transaction_coordinator_driver.h"
#include "mongo/client/remote_command_retry_scheduler.h"
#include "mongo/db/commands/txn_cmds_gen.h"
@@ -41,9 +41,9 @@
#include "mongo/db/ops/write_ops.h"
#include "mongo/db/repl/repl_client_info.h"
#include "mongo/db/s/sharding_state.h"
-#include "mongo/db/transaction_coordinator.h"
-#include "mongo/db/transaction_coordinator_document_gen.h"
-#include "mongo/db/transaction_coordinator_futures_util.h"
+#include "mongo/db/s/transaction_coordinator.h"
+#include "mongo/db/s/transaction_coordinator_document_gen.h"
+#include "mongo/db/s/transaction_coordinator_futures_util.h"
#include "mongo/db/write_concern.h"
#include "mongo/rpc/get_status_from_command_result.h"
#include "mongo/util/fail_point_service.h"
diff --git a/src/mongo/db/transaction_coordinator_driver.h b/src/mongo/db/s/transaction_coordinator_driver.h
index d19db109e12..90f70cc65b5 100644
--- a/src/mongo/db/transaction_coordinator_driver.h
+++ b/src/mongo/db/s/transaction_coordinator_driver.h
@@ -33,16 +33,15 @@
#include <vector>
#include "mongo/db/logical_session_id.h"
-#include "mongo/db/operation_context.h"
-#include "mongo/db/transaction_coordinator_futures_util.h"
+#include "mongo/db/s/transaction_coordinator_futures_util.h"
#include "mongo/executor/task_executor.h"
-#include "mongo/s/shard_id.h"
-#include "mongo/util/concurrency/mutex.h"
#include "mongo/util/concurrency/thread_pool.h"
#include "mongo/util/future.h"
namespace mongo {
+
class TransactionCoordinatorDocument;
+
namespace txn {
/**
diff --git a/src/mongo/db/transaction_coordinator_factory.cpp b/src/mongo/db/s/transaction_coordinator_factory.cpp
index e450add6a53..b1c2b3ac500 100644
--- a/src/mongo/db/transaction_coordinator_factory.cpp
+++ b/src/mongo/db/s/transaction_coordinator_factory.cpp
@@ -28,8 +28,12 @@
* it in the license file.
*/
-#include "mongo/db/transaction_coordinator_factory.h"
+#include "mongo/platform/basic.h"
+
+#include "mongo/db/s/transaction_coordinator_factory.h"
namespace mongo {
+
MONGO_DEFINE_SHIM(createTransactionCoordinator);
-}
+
+} // namespace mongo
diff --git a/src/mongo/db/transaction_coordinator_factory.h b/src/mongo/db/s/transaction_coordinator_factory.h
index 77204eaaa0d..dabb01041e9 100644
--- a/src/mongo/db/transaction_coordinator_factory.h
+++ b/src/mongo/db/s/transaction_coordinator_factory.h
@@ -35,6 +35,8 @@
#include "mongo/db/operation_context.h"
namespace mongo {
+
extern MONGO_DECLARE_SHIM((OperationContext * opCtx, TxnNumber clientTxnNumber)->void)
createTransactionCoordinator;
+
} // namespace mongo
diff --git a/src/mongo/db/transaction_coordinator_factory_mongod.cpp b/src/mongo/db/s/transaction_coordinator_factory_mongod.cpp
index 8d75313dbf0..91041105a8c 100644
--- a/src/mongo/db/transaction_coordinator_factory_mongod.cpp
+++ b/src/mongo/db/s/transaction_coordinator_factory_mongod.cpp
@@ -28,11 +28,14 @@
* it in the license file.
*/
-#include "mongo/db/transaction_coordinator_factory.h"
-#include "mongo/db/transaction_coordinator_service.h"
+#include "mongo/platform/basic.h"
+
+#include "mongo/db/s/transaction_coordinator_factory.h"
+#include "mongo/db/s/transaction_coordinator_service.h"
#include "mongo/db/transaction_participant.h"
namespace mongo {
+
MONGO_REGISTER_SHIM(createTransactionCoordinator)
(OperationContext* opCtx, TxnNumber clientTxnNumber)->void {
auto clientLsid = opCtx->getLogicalSessionId().get();
@@ -46,4 +49,5 @@ MONGO_REGISTER_SHIM(createTransactionCoordinator)
clientTxnNumber,
clockSource->now() + Seconds(transactionLifetimeLimitSeconds.load()));
}
+
} // namespace mongo
diff --git a/src/mongo/db/transaction_coordinator_futures_util.cpp b/src/mongo/db/s/transaction_coordinator_futures_util.cpp
index 699af67c887..f4374e7c5a2 100644
--- a/src/mongo/db/transaction_coordinator_futures_util.cpp
+++ b/src/mongo/db/s/transaction_coordinator_futures_util.cpp
@@ -32,7 +32,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/db/transaction_coordinator_futures_util.h"
+#include "mongo/db/s/transaction_coordinator_futures_util.h"
#include "mongo/client/remote_command_retry_scheduler.h"
#include "mongo/client/remote_command_targeter.h"
diff --git a/src/mongo/db/transaction_coordinator_futures_util.h b/src/mongo/db/s/transaction_coordinator_futures_util.h
index 1aa9d9eeacd..7e5519c08bf 100644
--- a/src/mongo/db/transaction_coordinator_futures_util.h
+++ b/src/mongo/db/s/transaction_coordinator_futures_util.h
@@ -36,6 +36,7 @@
#include "mongo/executor/task_executor.h"
#include "mongo/executor/task_executor_pool.h"
#include "mongo/s/grid.h"
+#include "mongo/s/shard_id.h"
#include "mongo/util/concurrency/mutex.h"
#include "mongo/util/future.h"
#include "mongo/util/time_support.h"
diff --git a/src/mongo/db/transaction_coordinator_futures_util_test.cpp b/src/mongo/db/s/transaction_coordinator_futures_util_test.cpp
index f5ebb46cbf6..cf7a2f75e5a 100644
--- a/src/mongo/db/transaction_coordinator_futures_util_test.cpp
+++ b/src/mongo/db/s/transaction_coordinator_futures_util_test.cpp
@@ -30,7 +30,7 @@
#include "mongo/platform/basic.h"
#include "mongo/client/remote_command_targeter_mock.h"
-#include "mongo/db/transaction_coordinator_futures_util.h"
+#include "mongo/db/s/transaction_coordinator_futures_util.h"
#include "mongo/s/catalog/sharding_catalog_client_mock.h"
#include "mongo/s/catalog/type_shard.h"
#include "mongo/s/shard_server_test_fixture.h"
diff --git a/src/mongo/db/transaction_coordinator_service.cpp b/src/mongo/db/s/transaction_coordinator_service.cpp
index 9180607bacb..00a3ea90cbc 100644
--- a/src/mongo/db/transaction_coordinator_service.cpp
+++ b/src/mongo/db/s/transaction_coordinator_service.cpp
@@ -32,10 +32,10 @@
#include "mongo/platform/basic.h"
-#include "mongo/db/transaction_coordinator_service.h"
+#include "mongo/db/s/transaction_coordinator_service.h"
#include "mongo/db/repl/repl_client_info.h"
-#include "mongo/db/transaction_coordinator_document_gen.h"
+#include "mongo/db/s/transaction_coordinator_document_gen.h"
#include "mongo/db/write_concern.h"
#include "mongo/executor/task_executor.h"
#include "mongo/executor/task_executor_pool.h"
diff --git a/src/mongo/db/transaction_coordinator_service.h b/src/mongo/db/s/transaction_coordinator_service.h
index a569dfdd617..bdcf676325b 100644
--- a/src/mongo/db/transaction_coordinator_service.h
+++ b/src/mongo/db/s/transaction_coordinator_service.h
@@ -31,7 +31,7 @@
#pragma once
#include "mongo/base/disallow_copying.h"
-#include "mongo/db/transaction_coordinator_catalog.h"
+#include "mongo/db/s/transaction_coordinator_catalog.h"
namespace mongo {
diff --git a/src/mongo/db/transaction_coordinator_service_test.cpp b/src/mongo/db/s/transaction_coordinator_service_test.cpp
index 115fb760b60..6f4eb769e2a 100644
--- a/src/mongo/db/transaction_coordinator_service_test.cpp
+++ b/src/mongo/db/s/transaction_coordinator_service_test.cpp
@@ -35,8 +35,8 @@
#include "mongo/db/commands/txn_cmds_gen.h"
#include "mongo/db/commands/txn_two_phase_commit_cmds_gen.h"
#include "mongo/db/dbdirectclient.h"
-#include "mongo/db/transaction_coordinator_service.h"
-#include "mongo/db/transaction_coordinator_test_fixture.h"
+#include "mongo/db/s/transaction_coordinator_service.h"
+#include "mongo/db/s/transaction_coordinator_test_fixture.h"
#include "mongo/db/write_concern_options.h"
#include "mongo/util/log.h"
#include "mongo/util/scopeguard.h"
diff --git a/src/mongo/db/transaction_coordinator_test.cpp b/src/mongo/db/s/transaction_coordinator_test.cpp
index 9d97184e7bf..c804abff8ae 100644
--- a/src/mongo/db/transaction_coordinator_test.cpp
+++ b/src/mongo/db/s/transaction_coordinator_test.cpp
@@ -35,8 +35,8 @@
#include "mongo/client/remote_command_targeter_mock.h"
#include "mongo/db/commands/txn_cmds_gen.h"
#include "mongo/db/commands/txn_two_phase_commit_cmds_gen.h"
-#include "mongo/db/transaction_coordinator_document_gen.h"
-#include "mongo/db/transaction_coordinator_test_fixture.h"
+#include "mongo/db/s/transaction_coordinator_document_gen.h"
+#include "mongo/db/s/transaction_coordinator_test_fixture.h"
#include "mongo/util/log.h"
namespace mongo {
diff --git a/src/mongo/db/transaction_coordinator_test_fixture.cpp b/src/mongo/db/s/transaction_coordinator_test_fixture.cpp
index b150a8a36a0..6c98f57f4c0 100644
--- a/src/mongo/db/transaction_coordinator_test_fixture.cpp
+++ b/src/mongo/db/s/transaction_coordinator_test_fixture.cpp
@@ -32,7 +32,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/db/transaction_coordinator_test_fixture.h"
+#include "mongo/db/s/transaction_coordinator_test_fixture.h"
#include "mongo/client/remote_command_targeter_mock.h"
#include "mongo/db/commands/txn_cmds_gen.h"
diff --git a/src/mongo/db/transaction_coordinator_test_fixture.h b/src/mongo/db/s/transaction_coordinator_test_fixture.h
index 7466ad5acc5..fddcde7ad23 100644
--- a/src/mongo/db/transaction_coordinator_test_fixture.h
+++ b/src/mongo/db/s/transaction_coordinator_test_fixture.h
@@ -34,7 +34,7 @@
#include <vector>
#include "mongo/base/status.h"
-#include "mongo/db/transaction_coordinator.h"
+#include "mongo/db/s/transaction_coordinator.h"
#include "mongo/s/shard_id.h"
#include "mongo/s/shard_server_test_fixture.h"
diff --git a/src/mongo/db/s/txn_two_phase_commit_cmds.cpp b/src/mongo/db/s/txn_two_phase_commit_cmds.cpp
index d458006ffdb..fe4a5cc08e5 100644
--- a/src/mongo/db/s/txn_two_phase_commit_cmds.cpp
+++ b/src/mongo/db/s/txn_two_phase_commit_cmds.cpp
@@ -38,8 +38,7 @@
#include "mongo/db/commands/txn_two_phase_commit_cmds_gen.h"
#include "mongo/db/repl/repl_client_info.h"
#include "mongo/db/s/sharding_state.h"
-#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_coordinator_service.h"
+#include "mongo/db/s/transaction_coordinator_service.h"
#include "mongo/db/transaction_participant.h"
#include "mongo/executor/task_executor.h"
#include "mongo/executor/task_executor_pool.h"
diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp
index 2142a5b7faa..64edc5ef272 100644
--- a/src/mongo/db/service_entry_point_common.cpp
+++ b/src/mongo/db/service_entry_point_common.cpp
@@ -70,13 +70,13 @@
#include "mongo/db/s/operation_sharding_state.h"
#include "mongo/db/s/sharded_connection_info.h"
#include "mongo/db/s/sharding_state.h"
+#include "mongo/db/s/transaction_coordinator_factory.h"
#include "mongo/db/service_entry_point_common.h"
#include "mongo/db/session_catalog_mongod.h"
#include "mongo/db/snapshot_window_util.h"
#include "mongo/db/stats/counters.h"
#include "mongo/db/stats/server_read_concern_metrics.h"
#include "mongo/db/stats/top.h"
-#include "mongo/db/transaction_coordinator_factory.h"
#include "mongo/db/transaction_participant.h"
#include "mongo/db/transaction_validation.h"
#include "mongo/rpc/factory.h"
diff --git a/src/mongo/embedded/transaction_coordinator_factory_embedded.cpp b/src/mongo/embedded/transaction_coordinator_factory_embedded.cpp
index 02cd687a735..afb8852ef03 100644
--- a/src/mongo/embedded/transaction_coordinator_factory_embedded.cpp
+++ b/src/mongo/embedded/transaction_coordinator_factory_embedded.cpp
@@ -28,7 +28,9 @@
* it in the license file.
*/
-#include "mongo/db/transaction_coordinator_factory.h"
+#include "mongo/platform/basic.h"
+
+#include "mongo/db/s/transaction_coordinator_factory.h"
namespace mongo {
MONGO_REGISTER_SHIM(createTransactionCoordinator)