summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/SConscript100
-rw-r--r--src/mongo/db/auth/auth_op_observer_test.cpp2
-rw-r--r--src/mongo/db/catalog/SConscript2
-rw-r--r--src/mongo/db/catalog/collection_impl.cpp2
-rw-r--r--src/mongo/db/catalog/index_catalog_entry_impl.cpp2
-rw-r--r--src/mongo/db/cluster_transaction_api.h2
-rw-r--r--src/mongo/db/commands/SConscript4
-rw-r--r--src/mongo/db/commands/dbhash.cpp2
-rw-r--r--src/mongo/db/commands/find_and_modify.cpp4
-rw-r--r--src/mongo/db/commands/find_cmd.cpp2
-rw-r--r--src/mongo/db/commands/internal_transactions_test_command_d.cpp2
-rw-r--r--src/mongo/db/commands/set_feature_compatibility_version_command.cpp2
-rw-r--r--src/mongo/db/commands/txn_cmds.cpp2
-rw-r--r--src/mongo/db/commands/write_commands.cpp4
-rw-r--r--src/mongo/db/fle_crud.cpp2
-rw-r--r--src/mongo/db/fle_crud.h2
-rw-r--r--src/mongo/db/fle_crud_mongod.cpp6
-rw-r--r--src/mongo/db/kill_sessions_local.cpp2
-rw-r--r--src/mongo/db/mongod_main.cpp4
-rw-r--r--src/mongo/db/op_observer/SConscript2
-rw-r--r--src/mongo/db/op_observer/op_observer_impl.cpp4
-rw-r--r--src/mongo/db/op_observer/op_observer_impl_test.cpp4
-rw-r--r--src/mongo/db/ops/SConscript4
-rw-r--r--src/mongo/db/ops/write_ops_exec.cpp4
-rw-r--r--src/mongo/db/ops/write_ops_retryability_test.cpp2
-rw-r--r--src/mongo/db/periodic_runner_job_abort_expired_transactions.cpp4
-rw-r--r--src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp2
-rw-r--r--src/mongo/db/pipeline/document_source_change_stream_test.cpp2
-rw-r--r--src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp2
-rw-r--r--src/mongo/db/pipeline/process_interface/SConscript2
-rw-r--r--src/mongo/db/pipeline/process_interface/common_mongod_process_interface.cpp6
-rw-r--r--src/mongo/db/query/fle/server_rewrite.h2
-rw-r--r--src/mongo/db/repl/SConscript10
-rw-r--r--src/mongo/db/repl/apply_ops.cpp2
-rw-r--r--src/mongo/db/repl/initial_syncer.cpp2
-rw-r--r--src/mongo/db/repl/oplog.cpp2
-rw-r--r--src/mongo/db/repl/oplog_applier_impl_test.cpp4
-rw-r--r--src/mongo/db/repl/oplog_applier_impl_test_fixture.h2
-rw-r--r--src/mongo/db/repl/oplog_interface.h2
-rw-r--r--src/mongo/db/repl/oplog_interface_mock.cpp2
-rw-r--r--src/mongo/db/repl/replication_recovery.cpp4
-rw-r--r--src/mongo/db/repl/replication_recovery_test.cpp4
-rw-r--r--src/mongo/db/repl/rollback_impl.cpp4
-rw-r--r--src/mongo/db/repl/rs_rollback.cpp2
-rw-r--r--src/mongo/db/repl/session_update_tracker.cpp4
-rw-r--r--src/mongo/db/repl/storage_timestamp_test.cpp4
-rw-r--r--src/mongo/db/repl/tenant_migration_recipient_service.cpp4
-rw-r--r--src/mongo/db/repl/tenant_migration_recipient_service_test.cpp2
-rw-r--r--src/mongo/db/repl/tenant_oplog_applier.cpp2
-rw-r--r--src/mongo/db/repl/transaction_oplog_application.cpp4
-rw-r--r--src/mongo/db/s/SConscript14
-rw-r--r--src/mongo/db/s/config/configsvr_remove_chunks_command.cpp2
-rw-r--r--src/mongo/db/s/config/configsvr_remove_tags_command.cpp2
-rw-r--r--src/mongo/db/s/config/configsvr_rename_collection_metadata_command.cpp2
-rw-r--r--src/mongo/db/s/config/sharding_catalog_manager.h2
-rw-r--r--src/mongo/db/s/config/sharding_catalog_manager_bump_collection_version_and_change_metadata_test.cpp2
-rw-r--r--src/mongo/db/s/config/sharding_catalog_manager_chunk_operations.cpp4
-rw-r--r--src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp2
-rw-r--r--src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp2
-rw-r--r--src/mongo/db/s/global_index/global_index_inserter.cpp2
-rw-r--r--src/mongo/db/s/migration_destination_manager.cpp2
-rw-r--r--src/mongo/db/s/resharding/document_source_resharding_iterate_transaction.cpp2
-rw-r--r--src/mongo/db/s/resharding/document_source_resharding_ownership_match.cpp2
-rw-r--r--src/mongo/db/s/resharding/resharding_agg_test.cpp2
-rw-r--r--src/mongo/db/s/resharding/resharding_data_copy_util.cpp4
-rw-r--r--src/mongo/db/s/resharding/resharding_destined_recipient_test.cpp2
-rw-r--r--src/mongo/db/s/resharding/resharding_oplog_application.cpp2
-rw-r--r--src/mongo/db/s/resharding/resharding_oplog_applier_test.cpp2
-rw-r--r--src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp2
-rw-r--r--src/mongo/db/s/resharding/resharding_oplog_session_application.cpp2
-rw-r--r--src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp2
-rw-r--r--src/mongo/db/s/resharding/resharding_txn_cloner.cpp4
-rw-r--r--src/mongo/db/s/resharding/resharding_txn_cloner.h2
-rw-r--r--src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp4
-rw-r--r--src/mongo/db/s/resharding/resharding_util_test.cpp2
-rw-r--r--src/mongo/db/s/session_catalog_migration_destination.cpp2
-rw-r--r--src/mongo/db/s/session_catalog_migration_destination_test.cpp6
-rw-r--r--src/mongo/db/s/session_catalog_migration_source.cpp6
-rw-r--r--src/mongo/db/s/session_catalog_migration_source.h4
-rw-r--r--src/mongo/db/s/session_catalog_migration_source_test.cpp4
-rw-r--r--src/mongo/db/s/shardsvr_create_collection_participant_command.cpp2
-rw-r--r--src/mongo/db/s/shardsvr_drop_collection_participant_command.cpp2
-rw-r--r--src/mongo/db/s/shardsvr_rename_collection_participant_command.cpp2
-rw-r--r--src/mongo/db/s/transaction_coordinator_factory_mongod.cpp4
-rw-r--r--src/mongo/db/s/transaction_coordinator_service.cpp2
-rw-r--r--src/mongo/db/s/txn_two_phase_commit_cmds.cpp2
-rw-r--r--src/mongo/db/service_entry_point_common.cpp2
-rw-r--r--src/mongo/db/session_catalog_mongod.cpp4
-rw-r--r--src/mongo/db/session_catalog_mongod_test.cpp2
-rw-r--r--src/mongo/db/transaction/SConscript78
-rw-r--r--src/mongo/db/transaction/internal_transactions_reap_service.cpp (renamed from src/mongo/db/internal_transactions_reap_service.cpp)4
-rw-r--r--src/mongo/db/transaction/internal_transactions_reap_service.h (renamed from src/mongo/db/internal_transactions_reap_service.h)0
-rw-r--r--src/mongo/db/transaction/internal_transactions_reap_service.idl (renamed from src/mongo/db/internal_transactions_reap_service.idl)0
-rw-r--r--src/mongo/db/transaction/internal_transactions_reap_service_test.cpp (renamed from src/mongo/db/internal_transactions_reap_service_test.cpp)6
-rw-r--r--src/mongo/db/transaction/retryable_writes_stats.cpp (renamed from src/mongo/db/retryable_writes_stats.cpp)4
-rw-r--r--src/mongo/db/transaction/retryable_writes_stats.h (renamed from src/mongo/db/retryable_writes_stats.h)2
-rw-r--r--src/mongo/db/transaction/server_transactions_metrics.cpp (renamed from src/mongo/db/server_transactions_metrics.cpp)6
-rw-r--r--src/mongo/db/transaction/server_transactions_metrics.h (renamed from src/mongo/db/server_transactions_metrics.h)2
-rw-r--r--src/mongo/db/transaction/session_txn_record.idl (renamed from src/mongo/db/session_txn_record.idl)0
-rw-r--r--src/mongo/db/transaction/transaction_api.cpp (renamed from src/mongo/db/transaction_api.cpp)2
-rw-r--r--src/mongo/db/transaction/transaction_api.h (renamed from src/mongo/db/transaction_api.h)0
-rw-r--r--src/mongo/db/transaction/transaction_api_test.cpp (renamed from src/mongo/db/transaction_api_test.cpp)2
-rw-r--r--src/mongo/db/transaction/transaction_history_iterator.cpp (renamed from src/mongo/db/transaction_history_iterator.cpp)2
-rw-r--r--src/mongo/db/transaction/transaction_history_iterator.h (renamed from src/mongo/db/transaction_history_iterator.h)0
-rw-r--r--src/mongo/db/transaction/transaction_history_iterator_test.cpp (renamed from src/mongo/db/transaction_history_iterator_test.cpp)2
-rw-r--r--src/mongo/db/transaction/transaction_metrics_observer.cpp (renamed from src/mongo/db/transaction_metrics_observer.cpp)6
-rw-r--r--src/mongo/db/transaction/transaction_metrics_observer.h (renamed from src/mongo/db/transaction_metrics_observer.h)2
-rw-r--r--src/mongo/db/transaction/transaction_participant.cpp (renamed from src/mongo/db/transaction_participant.cpp)10
-rw-r--r--src/mongo/db/transaction/transaction_participant.h (renamed from src/mongo/db/transaction_participant.h)4
-rw-r--r--src/mongo/db/transaction/transaction_participant.idl (renamed from src/mongo/db/transaction_participant.idl)2
-rw-r--r--src/mongo/db/transaction/transaction_participant_resource_yielder.cpp (renamed from src/mongo/db/transaction_participant_resource_yielder.cpp)4
-rw-r--r--src/mongo/db/transaction/transaction_participant_resource_yielder.h (renamed from src/mongo/db/transaction_participant_resource_yielder.h)0
-rw-r--r--src/mongo/db/transaction/transaction_participant_retryable_writes_test.cpp (renamed from src/mongo/db/transaction_participant_retryable_writes_test.cpp)4
-rw-r--r--src/mongo/db/transaction/transaction_participant_test.cpp (renamed from src/mongo/db/transaction_participant_test.cpp)6
-rw-r--r--src/mongo/db/transaction/transactions_stats.idl (renamed from src/mongo/db/transactions_stats.idl)0
-rw-r--r--src/mongo/dbtests/SConscript2
-rw-r--r--src/mongo/s/commands/SConscript4
-rw-r--r--src/mongo/s/commands/cluster_find_and_modify_cmd.cpp2
-rw-r--r--src/mongo/s/commands/document_shard_key_update_util.h2
-rw-r--r--src/mongo/s/commands/internal_transactions_test_command.h2
-rw-r--r--src/mongo/s/query/blocking_results_merger.cpp2
121 files changed, 265 insertions, 259 deletions
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript
index 41d37afc7b0..e1bbc943142 100644
--- a/src/mongo/db/SConscript
+++ b/src/mongo/db/SConscript
@@ -44,6 +44,7 @@ env.SConscript(
'stats',
'storage',
'timeseries',
+ 'transaction',
'update',
'views',
],
@@ -862,79 +863,6 @@ env.Library(
)
env.Library(
- target='transaction',
- source=[
- 'internal_transactions_reap_service.cpp',
- 'retryable_writes_stats.cpp',
- 'server_transactions_metrics.cpp',
- 'session_catalog_mongod.cpp',
- 'transaction_history_iterator.cpp',
- 'transaction_metrics_observer.cpp',
- 'transaction_participant.cpp',
- 'transaction_participant_resource_yielder.cpp',
- 'internal_transactions_reap_service.idl',
- 'session_txn_record.idl',
- 'transaction_participant.idl',
- 'transactions_stats.idl',
- ],
- LIBDEPS_PRIVATE=[
- '$BUILD_DIR/mongo/db/catalog/collection_catalog',
- '$BUILD_DIR/mongo/db/catalog/database_holder',
- '$BUILD_DIR/mongo/db/catalog/local_oplog_info',
- '$BUILD_DIR/mongo/db/commands/server_status',
- '$BUILD_DIR/mongo/db/commands/test_commands_enabled',
- '$BUILD_DIR/mongo/db/commands/txn_cmd_request',
- '$BUILD_DIR/mongo/db/concurrency/exception_util',
- '$BUILD_DIR/mongo/db/index/index_access_method',
- '$BUILD_DIR/mongo/db/repl/apply_ops_command_info',
- '$BUILD_DIR/mongo/db/repl/repl_server_parameters',
- '$BUILD_DIR/mongo/db/repl/replica_set_aware_service',
- '$BUILD_DIR/mongo/db/stats/fill_locker_info',
- '$BUILD_DIR/mongo/db/stats/top',
- '$BUILD_DIR/mongo/db/stats/transaction_stats',
- '$BUILD_DIR/mongo/db/update/update_driver',
- '$BUILD_DIR/mongo/idl/idl_parser',
- '$BUILD_DIR/mongo/idl/server_parameter',
- '$BUILD_DIR/mongo/s/sharding_router_api',
- '$BUILD_DIR/mongo/util/concurrency/thread_pool',
- 'catalog_raii',
- 'curop_failpoint_helpers',
- 'dbdirectclient',
- 'index_builds_coordinator_interface',
- 'index_commands_idl',
- 'internal_transactions_feature_flag',
- 'multitenancy',
- 'not_primary_error_tracker',
- 'query_exec',
- 'session_catalog',
- ],
-)
-
-env.Library(
- target='transaction_api',
- source=[
- 'transaction_api.cpp',
- ],
- LIBDEPS_PRIVATE=[
- '$BUILD_DIR/mongo/db/auth/auth',
- '$BUILD_DIR/mongo/db/query/command_request_response',
- '$BUILD_DIR/mongo/db/query/query_request',
- '$BUILD_DIR/mongo/db/s/sharding_api_d',
- '$BUILD_DIR/mongo/executor/task_executor_interface',
- '$BUILD_DIR/mongo/rpc/command_status',
- '$BUILD_DIR/mongo/rpc/rpc',
- '$BUILD_DIR/mongo/transport/service_entry_point',
- 'logical_session_id',
- 'logical_session_id_helpers',
- 'operation_time_tracker',
- 'repl/repl_coordinator_interface',
- 'service_context',
- 'session_catalog',
- 'shared_request_handling',
- ],
-)
-
-env.Library(
target='fle_crud',
source=[
'fle_crud.cpp',
@@ -945,7 +873,7 @@ env.Library(
'$BUILD_DIR/mongo/db/ops/write_ops_parsers',
'$BUILD_DIR/mongo/db/pipeline/pipeline',
'$BUILD_DIR/mongo/db/query/command_request_response',
- 'transaction_api',
+ '$BUILD_DIR/mongo/db/transaction/transaction_api',
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/crypto/fle_crypto',
@@ -969,6 +897,7 @@ env.Library(
'$BUILD_DIR/mongo/crypto/fle_crypto',
'$BUILD_DIR/mongo/db/query/query_request',
'$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'$BUILD_DIR/mongo/executor/network_interface_factory',
'$BUILD_DIR/mongo/executor/task_executor_pool',
'$BUILD_DIR/mongo/executor/thread_pool_task_executor',
@@ -976,7 +905,6 @@ env.Library(
'fle_crud',
'logical_session_id',
'session_catalog',
- 'transaction',
],
)
@@ -999,6 +927,7 @@ env.Library(
'cluster_transaction_api.cpp',
],
LIBDEPS_PRIVATE=[
+ '$BUILD_DIR/mongo/db/transaction/transaction_api',
'$BUILD_DIR/mongo/rpc/rpc',
'$BUILD_DIR/mongo/s/startup_initialization',
'$BUILD_DIR/mongo/transport/service_entry_point',
@@ -1006,7 +935,6 @@ env.Library(
'logical_session_id_helpers',
'service_context',
'shared_request_handling',
- 'transaction_api',
],
)
@@ -1125,6 +1053,7 @@ env.Library(
'$BUILD_DIR/mongo/db/stats/top',
'$BUILD_DIR/mongo/db/storage/storage_engine_lock_file',
'$BUILD_DIR/mongo/db/storage/storage_engine_metadata',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'$BUILD_DIR/mongo/db/write_block_bypass',
'initialize_api_parameters',
'introspect',
@@ -1132,7 +1061,6 @@ env.Library(
'not_primary_error_tracker',
'query_exec',
'shared_request_handling',
- 'transaction',
],
)
@@ -1889,8 +1817,8 @@ env.Library(
'query_exec',
],
LIBDEPS_PRIVATE=[
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'session_catalog',
- 'transaction',
],
)
@@ -1915,9 +1843,9 @@ env.Library(
'periodic_runner_job_abort_expired_transactions.cpp',
],
LIBDEPS_PRIVATE=[
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'$BUILD_DIR/mongo/util/periodic_runner',
'kill_sessions_local',
- 'transaction',
],
)
@@ -2631,7 +2559,6 @@ if wiredtiger:
'index_builds_coordinator_mongod_test.cpp',
'index_builds_coordinator_test.cpp',
'internal_session_pool_test.cpp',
- 'internal_transactions_reap_service_test.cpp',
'keypattern_test.cpp',
'keys_collection_document_test.cpp',
'logical_session_cache_test.cpp',
@@ -2660,10 +2587,11 @@ if wiredtiger:
'startup_warnings_mongod_test.cpp',
'thread_client_test.cpp',
'time_proof_service_test.cpp',
- 'transaction_api_test.cpp',
- 'transaction_history_iterator_test.cpp',
- 'transaction_participant_retryable_writes_test.cpp',
- 'transaction_participant_test.cpp',
+ 'transaction/internal_transactions_reap_service_test.cpp',
+ 'transaction/transaction_api_test.cpp',
+ 'transaction/transaction_history_iterator_test.cpp',
+ 'transaction/transaction_participant_retryable_writes_test.cpp',
+ 'transaction/transaction_participant_test.cpp',
'ttl_test.cpp',
'update_index_data_test.cpp',
'vector_clock_mongod_test.cpp',
@@ -2713,6 +2641,8 @@ if wiredtiger:
'$BUILD_DIR/mongo/db/stats/fill_locker_info',
'$BUILD_DIR/mongo/db/stats/transaction_stats',
'$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction_api',
'$BUILD_DIR/mongo/executor/async_timer_mock',
'$BUILD_DIR/mongo/idl/idl_parser',
'$BUILD_DIR/mongo/idl/server_parameter',
@@ -2766,8 +2696,6 @@ if wiredtiger:
'snapshot_window_options',
'startup_warnings_mongod',
'time_proof_service',
- 'transaction',
- 'transaction_api',
'ttl_d',
'update_index_data',
'vector_clock',
diff --git a/src/mongo/db/auth/auth_op_observer_test.cpp b/src/mongo/db/auth/auth_op_observer_test.cpp
index 4ae2d589c5c..ebf2e366477 100644
--- a/src/mongo/db/auth/auth_op_observer_test.cpp
+++ b/src/mongo/db/auth/auth_op_observer_test.cpp
@@ -45,7 +45,7 @@
#include "mongo/db/repl/storage_interface_mock.h"
#include "mongo/db/service_context_d_test_fixture.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/unittest/death_test.h"
#include "mongo/util/clock_source_mock.h"
diff --git a/src/mongo/db/catalog/SConscript b/src/mongo/db/catalog/SConscript
index d33b86a294a..f9042fbfc27 100644
--- a/src/mongo/db/catalog/SConscript
+++ b/src/mongo/db/catalog/SConscript
@@ -387,7 +387,7 @@ env.Library(
'$BUILD_DIR/mongo/db/system_index',
'$BUILD_DIR/mongo/db/timeseries/timeseries_conversion_util',
'$BUILD_DIR/mongo/db/timeseries/timeseries_extended_range',
- '$BUILD_DIR/mongo/db/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'$BUILD_DIR/mongo/db/ttl_collection_cache',
'$BUILD_DIR/mongo/db/vector_clock',
'$BUILD_DIR/mongo/db/views/view_catalog_helpers',
diff --git a/src/mongo/db/catalog/collection_impl.cpp b/src/mongo/db/catalog/collection_impl.cpp
index af8fe074fb1..076e8fdc159 100644
--- a/src/mongo/db/catalog/collection_impl.cpp
+++ b/src/mongo/db/catalog/collection_impl.cpp
@@ -80,7 +80,7 @@
#include "mongo/db/timeseries/timeseries_constants.h"
#include "mongo/db/timeseries/timeseries_extended_range.h"
#include "mongo/db/timeseries/timeseries_index_schema_conversion_functions.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/ttl_collection_cache.h"
#include "mongo/db/update/update_driver.h"
diff --git a/src/mongo/db/catalog/index_catalog_entry_impl.cpp b/src/mongo/db/catalog/index_catalog_entry_impl.cpp
index 4ef162247d4..318e1007bc4 100644
--- a/src/mongo/db/catalog/index_catalog_entry_impl.cpp
+++ b/src/mongo/db/catalog/index_catalog_entry_impl.cpp
@@ -52,7 +52,7 @@
#include "mongo/db/service_context.h"
#include "mongo/db/storage/durable_catalog.h"
#include "mongo/db/timeseries/timeseries_index_schema_conversion_functions.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#include "mongo/util/scopeguard.h"
diff --git a/src/mongo/db/cluster_transaction_api.h b/src/mongo/db/cluster_transaction_api.h
index e59a9ffa1f7..6a15cc706ac 100644
--- a/src/mongo/db/cluster_transaction_api.h
+++ b/src/mongo/db/cluster_transaction_api.h
@@ -30,7 +30,7 @@
#pragma once
#include "mongo/db/operation_context.h"
-#include "mongo/db/transaction_api.h"
+#include "mongo/db/transaction/transaction_api.h"
#include "mongo/s/service_entry_point_mongos.h"
namespace mongo::txn_api::details {
diff --git a/src/mongo/db/commands/SConscript b/src/mongo/db/commands/SConscript
index f76701cc09b..1a4cdc904b5 100644
--- a/src/mongo/db/commands/SConscript
+++ b/src/mongo/db/commands/SConscript
@@ -408,7 +408,7 @@ env.Library(
'$BUILD_DIR/mongo/db/timeseries/timeseries_extended_range',
'$BUILD_DIR/mongo/db/timeseries/timeseries_options',
'$BUILD_DIR/mongo/db/timeseries/timeseries_stats',
- '$BUILD_DIR/mongo/db/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'$BUILD_DIR/mongo/db/views/view_catalog_helpers',
'$BUILD_DIR/mongo/db/views/views_mongod',
'$BUILD_DIR/mongo/executor/async_request_executor',
@@ -593,7 +593,7 @@ env.Library(
'$BUILD_DIR/mongo/db/serverless/shard_split_donor_service',
'$BUILD_DIR/mongo/db/tenant_id',
'$BUILD_DIR/mongo/db/timeseries/timeseries_conversion_util',
- '$BUILD_DIR/mongo/db/transaction_api',
+ '$BUILD_DIR/mongo/db/transaction/transaction_api',
'$BUILD_DIR/mongo/idl/idl_parser',
'$BUILD_DIR/mongo/util/net/ssl_manager',
'cluster_server_parameter_commands_invocation',
diff --git a/src/mongo/db/commands/dbhash.cpp b/src/mongo/db/commands/dbhash.cpp
index c3cb85c3d2a..df99d555d30 100644
--- a/src/mongo/db/commands/dbhash.cpp
+++ b/src/mongo/db/commands/dbhash.cpp
@@ -47,7 +47,7 @@
#include "mongo/db/query/internal_plans.h"
#include "mongo/db/repl/replication_coordinator.h"
#include "mongo/db/storage/storage_engine.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#include "mongo/platform/mutex.h"
#include "mongo/util/md5.hpp"
diff --git a/src/mongo/db/commands/find_and_modify.cpp b/src/mongo/db/commands/find_and_modify.cpp
index 5c1e8d0c387..79f9706665a 100644
--- a/src/mongo/db/commands/find_and_modify.cpp
+++ b/src/mongo/db/commands/find_and_modify.cpp
@@ -63,7 +63,6 @@
#include "mongo/db/query/plan_summary_stats.h"
#include "mongo/db/repl/repl_client_info.h"
#include "mongo/db/repl/replication_coordinator.h"
-#include "mongo/db/retryable_writes_stats.h"
#include "mongo/db/s/collection_sharding_state.h"
#include "mongo/db/s/operation_sharding_state.h"
#include "mongo/db/server_options.h"
@@ -71,7 +70,8 @@
#include "mongo/db/stats/resource_consumption_metrics.h"
#include "mongo/db/stats/top.h"
#include "mongo/db/storage/duplicate_key_error_info.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/retryable_writes_stats.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/write_concern.h"
#include "mongo/logv2/log.h"
#include "mongo/util/log_and_backoff.h"
diff --git a/src/mongo/db/commands/find_cmd.cpp b/src/mongo/db/commands/find_cmd.cpp
index 5202208d604..91f67ce2f58 100644
--- a/src/mongo/db/commands/find_cmd.cpp
+++ b/src/mongo/db/commands/find_cmd.cpp
@@ -61,7 +61,7 @@
#include "mongo/db/stats/server_read_concern_metrics.h"
#include "mongo/db/storage/storage_engine.h"
#include "mongo/db/storage/storage_parameters_gen.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#include "mongo/rpc/get_status_from_command_result.h"
#include "mongo/util/fail_point.h"
diff --git a/src/mongo/db/commands/internal_transactions_test_command_d.cpp b/src/mongo/db/commands/internal_transactions_test_command_d.cpp
index 7fb3e95fc51..77e8037be5d 100644
--- a/src/mongo/db/commands/internal_transactions_test_command_d.cpp
+++ b/src/mongo/db/commands/internal_transactions_test_command_d.cpp
@@ -28,7 +28,7 @@
*/
#include "mongo/db/cluster_transaction_api.h"
-#include "mongo/db/transaction_participant_resource_yielder.h"
+#include "mongo/db/transaction/transaction_participant_resource_yielder.h"
#include "mongo/s/commands/internal_transactions_test_command.h"
namespace mongo {
diff --git a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp
index 2466fb480c3..258885d46e2 100644
--- a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp
+++ b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp
@@ -76,8 +76,8 @@
#include "mongo/db/server_options.h"
#include "mongo/db/serverless/shard_split_donor_service.h"
#include "mongo/db/session_catalog.h"
-#include "mongo/db/session_txn_record_gen.h"
#include "mongo/db/timeseries/timeseries_index_schema_conversion_functions.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
#include "mongo/db/vector_clock.h"
#include "mongo/idl/cluster_server_parameter_gen.h"
#include "mongo/logv2/log.h"
diff --git a/src/mongo/db/commands/txn_cmds.cpp b/src/mongo/db/commands/txn_cmds.cpp
index 483095e4795..ce879e0ee2a 100644
--- a/src/mongo/db/commands/txn_cmds.cpp
+++ b/src/mongo/db/commands/txn_cmds.cpp
@@ -41,7 +41,7 @@
#include "mongo/db/s/sharding_state.h"
#include "mongo/db/s/transaction_coordinator_service.h"
#include "mongo/db/service_context.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/transaction_validation.h"
#include "mongo/logv2/log.h"
diff --git a/src/mongo/db/commands/write_commands.cpp b/src/mongo/db/commands/write_commands.cpp
index f6d57efb0e4..14d5ea2a33e 100644
--- a/src/mongo/db/commands/write_commands.cpp
+++ b/src/mongo/db/commands/write_commands.cpp
@@ -63,7 +63,6 @@
#include "mongo/db/repl/tenant_migration_access_blocker_util.h"
#include "mongo/db/repl/tenant_migration_conflict_info.h"
#include "mongo/db/repl/tenant_migration_decoration.h"
-#include "mongo/db/retryable_writes_stats.h"
#include "mongo/db/s/collection_sharding_state.h"
#include "mongo/db/s/operation_sharding_state.h"
#include "mongo/db/stats/counters.h"
@@ -75,7 +74,8 @@
#include "mongo/db/timeseries/timeseries_extended_range.h"
#include "mongo/db/timeseries/timeseries_options.h"
#include "mongo/db/timeseries/timeseries_stats.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/retryable_writes_stats.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/write_concern.h"
#include "mongo/logv2/log.h"
#include "mongo/logv2/redaction.h"
diff --git a/src/mongo/db/fle_crud.cpp b/src/mongo/db/fle_crud.cpp
index 49e1dfb400a..6a4f16c2461 100644
--- a/src/mongo/db/fle_crud.cpp
+++ b/src/mongo/db/fle_crud.cpp
@@ -50,7 +50,7 @@
#include "mongo/db/query/fle/server_rewrite.h"
#include "mongo/db/repl/repl_client_info.h"
#include "mongo/db/service_context.h"
-#include "mongo/db/transaction_api.h"
+#include "mongo/db/transaction/transaction_api.h"
#include "mongo/idl/idl_parser.h"
#include "mongo/logv2/log.h"
#include "mongo/rpc/factory.h"
diff --git a/src/mongo/db/fle_crud.h b/src/mongo/db/fle_crud.h
index 9175f2ff3f9..d4441fb65ff 100644
--- a/src/mongo/db/fle_crud.h
+++ b/src/mongo/db/fle_crud.h
@@ -44,7 +44,7 @@
#include "mongo/db/query/count_command_gen.h"
#include "mongo/db/server_options.h"
#include "mongo/db/service_context.h"
-#include "mongo/db/transaction_api.h"
+#include "mongo/db/transaction/transaction_api.h"
#include "mongo/rpc/op_msg.h"
#include "mongo/s/write_ops/batch_write_exec.h"
#include "mongo/s/write_ops/batched_command_response.h"
diff --git a/src/mongo/db/fle_crud_mongod.cpp b/src/mongo/db/fle_crud_mongod.cpp
index 46098aa20f7..66d548b2756 100644
--- a/src/mongo/db/fle_crud_mongod.cpp
+++ b/src/mongo/db/fle_crud_mongod.cpp
@@ -49,9 +49,9 @@
#include "mongo/db/session.h"
#include "mongo/db/session_catalog.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_api.h"
-#include "mongo/db/transaction_participant.h"
-#include "mongo/db/transaction_participant_resource_yielder.h"
+#include "mongo/db/transaction/transaction_api.h"
+#include "mongo/db/transaction/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant_resource_yielder.h"
#include "mongo/executor/network_interface_factory.h"
#include "mongo/executor/thread_pool_task_executor.h"
#include "mongo/idl/idl_parser.h"
diff --git a/src/mongo/db/kill_sessions_local.cpp b/src/mongo/db/kill_sessions_local.cpp
index 2c4f2089413..fcb0b396ded 100644
--- a/src/mongo/db/kill_sessions_local.cpp
+++ b/src/mongo/db/kill_sessions_local.cpp
@@ -38,7 +38,7 @@
#include "mongo/db/operation_context.h"
#include "mongo/db/service_context.h"
#include "mongo/db/session_catalog.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp
index 6b4ba9d46bd..eb212db69e0 100644
--- a/src/mongo/db/mongod_main.cpp
+++ b/src/mongo/db/mongod_main.cpp
@@ -88,7 +88,6 @@
#include "mongo/db/index_builds_coordinator_mongod.h"
#include "mongo/db/index_names.h"
#include "mongo/db/initialize_server_global_state.h"
-#include "mongo/db/internal_transactions_reap_service.h"
#include "mongo/db/introspect.h"
#include "mongo/db/json.h"
#include "mongo/db/keys_collection_client_direct.h"
@@ -177,7 +176,8 @@
#include "mongo/db/storage/storage_options.h"
#include "mongo/db/storage/storage_parameters_gen.h"
#include "mongo/db/system_index.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/internal_transactions_reap_service.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/ttl.h"
#include "mongo/db/vector_clock_metadata_hook.h"
#include "mongo/db/wire_version.h"
diff --git a/src/mongo/db/op_observer/SConscript b/src/mongo/db/op_observer/SConscript
index f21d19f1d75..7c93d45a54f 100644
--- a/src/mongo/db/op_observer/SConscript
+++ b/src/mongo/db/op_observer/SConscript
@@ -81,7 +81,7 @@ env.Library(
'$BUILD_DIR/mongo/db/server_feature_flags',
'$BUILD_DIR/mongo/db/session_catalog',
'$BUILD_DIR/mongo/db/timeseries/bucket_catalog',
- '$BUILD_DIR/mongo/db/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'$BUILD_DIR/mongo/db/views/views_mongod',
'$BUILD_DIR/mongo/s/coreshard',
'$BUILD_DIR/mongo/s/grid',
diff --git a/src/mongo/db/op_observer/op_observer_impl.cpp b/src/mongo/db/op_observer/op_observer_impl.cpp
index 44e9e812afd..004dc7f4715 100644
--- a/src/mongo/db/op_observer/op_observer_impl.cpp
+++ b/src/mongo/db/op_observer/op_observer_impl.cpp
@@ -71,8 +71,8 @@
#include "mongo/db/server_options.h"
#include "mongo/db/session_catalog_mongod.h"
#include "mongo/db/timeseries/bucket_catalog.h"
-#include "mongo/db/transaction_participant.h"
-#include "mongo/db/transaction_participant_gen.h"
+#include "mongo/db/transaction/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant_gen.h"
#include "mongo/db/views/durable_view_catalog.h"
#include "mongo/logv2/log.h"
#include "mongo/s/client/shard_registry.h"
diff --git a/src/mongo/db/op_observer/op_observer_impl_test.cpp b/src/mongo/db/op_observer/op_observer_impl_test.cpp
index d6622de3b13..98e26f41d5d 100644
--- a/src/mongo/db/op_observer/op_observer_impl_test.cpp
+++ b/src/mongo/db/op_observer/op_observer_impl_test.cpp
@@ -62,8 +62,8 @@
#include "mongo/db/repl/tenant_migration_access_blocker_registry.h"
#include "mongo/db/service_context_d_test_fixture.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
-#include "mongo/db/transaction_participant_gen.h"
+#include "mongo/db/transaction/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant_gen.h"
#include "mongo/idl/server_parameter_test_util.h"
#include "mongo/logv2/log.h"
#include "mongo/rpc/get_status_from_command_result.h"
diff --git a/src/mongo/db/ops/SConscript b/src/mongo/db/ops/SConscript
index 575e511e428..d9ff91cd2fc 100644
--- a/src/mongo/db/ops/SConscript
+++ b/src/mongo/db/ops/SConscript
@@ -51,7 +51,7 @@ env.Library(
'$BUILD_DIR/mongo/db/stats/counters',
'$BUILD_DIR/mongo/db/stats/server_read_concern_write_concern_metrics',
'$BUILD_DIR/mongo/db/timeseries/timeseries_conversion_util',
- '$BUILD_DIR/mongo/db/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'$BUILD_DIR/mongo/util/fail_point',
'$BUILD_DIR/mongo/util/log_and_backoff',
'write_ops',
@@ -121,7 +121,7 @@ env.CppUnitTest(
'$BUILD_DIR/mongo/db/repl/mock_repl_coord_server_fixture',
'$BUILD_DIR/mongo/db/repl/oplog_entry',
'$BUILD_DIR/mongo/db/session_catalog',
- '$BUILD_DIR/mongo/db/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'write_ops',
'write_ops_exec',
'write_ops_parsers',
diff --git a/src/mongo/db/ops/write_ops_exec.cpp b/src/mongo/db/ops/write_ops_exec.cpp
index 8156553851e..297b6c8c0bf 100644
--- a/src/mongo/db/ops/write_ops_exec.cpp
+++ b/src/mongo/db/ops/write_ops_exec.cpp
@@ -71,7 +71,6 @@
#include "mongo/db/repl/replication_coordinator.h"
#include "mongo/db/repl/tenant_migration_conflict_info.h"
#include "mongo/db/repl/tenant_migration_decoration.h"
-#include "mongo/db/retryable_writes_stats.h"
#include "mongo/db/s/collection_sharding_state.h"
#include "mongo/db/s/operation_sharding_state.h"
#include "mongo/db/s/sharding_state.h"
@@ -82,7 +81,8 @@
#include "mongo/db/storage/storage_parameters_gen.h"
#include "mongo/db/timeseries/timeseries_index_schema_conversion_functions.h"
#include "mongo/db/timeseries/timeseries_update_delete_util.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/retryable_writes_stats.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/update/document_diff_applier.h"
#include "mongo/db/update/path_support.h"
#include "mongo/db/update/update_oplog_entry_serialization.h"
diff --git a/src/mongo/db/ops/write_ops_retryability_test.cpp b/src/mongo/db/ops/write_ops_retryability_test.cpp
index f1000b3e3f5..96ed0bac29c 100644
--- a/src/mongo/db/ops/write_ops_retryability_test.cpp
+++ b/src/mongo/db/ops/write_ops_retryability_test.cpp
@@ -44,7 +44,7 @@
#include "mongo/db/repl/replication_coordinator_mock.h"
#include "mongo/db/service_context.h"
#include "mongo/db/service_context_d_test_fixture.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/unittest/unittest.h"
namespace mongo {
diff --git a/src/mongo/db/periodic_runner_job_abort_expired_transactions.cpp b/src/mongo/db/periodic_runner_job_abort_expired_transactions.cpp
index cb1f07f058e..056f219cc83 100644
--- a/src/mongo/db/periodic_runner_job_abort_expired_transactions.cpp
+++ b/src/mongo/db/periodic_runner_job_abort_expired_transactions.cpp
@@ -35,8 +35,8 @@
#include "mongo/db/client.h"
#include "mongo/db/kill_sessions_local.h"
#include "mongo/db/service_context.h"
-#include "mongo/db/transaction_participant.h"
-#include "mongo/db/transaction_participant_gen.h"
+#include "mongo/db/transaction/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant_gen.h"
#include "mongo/logv2/log.h"
#include "mongo/util/periodic_runner.h"
diff --git a/src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp b/src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp
index dc087c22e3f..934d353ce9f 100644
--- a/src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp
+++ b/src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp
@@ -36,7 +36,7 @@
#include "mongo/bson/simple_bsonelement_comparator.h"
#include "mongo/db/pipeline/change_stream_helpers_legacy.h"
#include "mongo/db/pipeline/change_stream_preimage_gen.h"
-#include "mongo/db/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
#include "mongo/util/intrusive_counter.h"
#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand
diff --git a/src/mongo/db/pipeline/document_source_change_stream_test.cpp b/src/mongo/db/pipeline/document_source_change_stream_test.cpp
index 7875d039809..1f5ca2eba18 100644
--- a/src/mongo/db/pipeline/document_source_change_stream_test.cpp
+++ b/src/mongo/db/pipeline/document_source_change_stream_test.cpp
@@ -66,7 +66,7 @@
#include "mongo/db/repl/replication_coordinator_mock.h"
#include "mongo/db/s/resharding/resharding_change_event_o2_field_gen.h"
#include "mongo/db/s/resharding/resharding_util.h"
-#include "mongo/db/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
#include "mongo/idl/server_parameter_test_util.h"
#include "mongo/unittest/death_test.h"
#include "mongo/unittest/unittest.h"
diff --git a/src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp b/src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp
index 63b0c9735e3..b99a1263953 100644
--- a/src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp
+++ b/src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp
@@ -35,7 +35,7 @@
#include "mongo/db/pipeline/change_stream_filter_helpers.h"
#include "mongo/db/pipeline/change_stream_rewrite_helpers.h"
#include "mongo/db/query/query_feature_flags_gen.h"
-#include "mongo/db/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand
diff --git a/src/mongo/db/pipeline/process_interface/SConscript b/src/mongo/db/pipeline/process_interface/SConscript
index d1f1cb7def9..3578d0b463f 100644
--- a/src/mongo/db/pipeline/process_interface/SConscript
+++ b/src/mongo/db/pipeline/process_interface/SConscript
@@ -40,7 +40,7 @@ env.Library(
LIBDEPS=[
'$BUILD_DIR/mongo/db/ops/write_ops_exec',
'$BUILD_DIR/mongo/db/pipeline/pipeline',
- '$BUILD_DIR/mongo/db/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'common_process_interface',
],
LIBDEPS_PRIVATE=[
diff --git a/src/mongo/db/pipeline/process_interface/common_mongod_process_interface.cpp b/src/mongo/db/pipeline/process_interface/common_mongod_process_interface.cpp
index 4e13c886c71..e200ba40bf3 100644
--- a/src/mongo/db/pipeline/process_interface/common_mongod_process_interface.cpp
+++ b/src/mongo/db/pipeline/process_interface/common_mongod_process_interface.cpp
@@ -67,9 +67,9 @@
#include "mongo/db/stats/storage_stats.h"
#include "mongo/db/storage/backup_cursor_hooks.h"
#include "mongo/db/storage/durable_catalog.h"
-#include "mongo/db/transaction_history_iterator.h"
-#include "mongo/db/transaction_participant.h"
-#include "mongo/db/transaction_participant_resource_yielder.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant_resource_yielder.h"
#include "mongo/logv2/log.h"
#include "mongo/s/cluster_commands_helpers.h"
#include "mongo/s/query/document_source_merge_cursors.h"
diff --git a/src/mongo/db/query/fle/server_rewrite.h b/src/mongo/db/query/fle/server_rewrite.h
index 2fe50745e9b..5663b5fd1e2 100644
--- a/src/mongo/db/query/fle/server_rewrite.h
+++ b/src/mongo/db/query/fle/server_rewrite.h
@@ -40,7 +40,7 @@
#include "mongo/db/namespace_string.h"
#include "mongo/db/pipeline/expression_context.h"
#include "mongo/db/query/count_command_gen.h"
-#include "mongo/db/transaction_api.h"
+#include "mongo/db/transaction/transaction_api.h"
namespace mongo {
class FLEQueryInterface;
diff --git a/src/mongo/db/repl/SConscript b/src/mongo/db/repl/SConscript
index adb49a8b94e..dd5272dde1b 100644
--- a/src/mongo/db/repl/SConscript
+++ b/src/mongo/db/repl/SConscript
@@ -89,7 +89,7 @@ env.Library(
'$BUILD_DIR/mongo/db/pipeline/change_stream_preimage',
'$BUILD_DIR/mongo/db/stats/counters',
'$BUILD_DIR/mongo/db/stats/server_read_concern_write_concern_metrics',
- '$BUILD_DIR/mongo/db/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'$BUILD_DIR/mongo/idl/idl_parser',
'$BUILD_DIR/mongo/rpc/command_status',
'dbcheck',
@@ -414,7 +414,7 @@ env.Library(
LIBDEPS=[
'$BUILD_DIR/mongo/db/db_raii',
'$BUILD_DIR/mongo/db/query_exec',
- '$BUILD_DIR/mongo/db/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
],
)
@@ -1222,7 +1222,7 @@ env.Library(
'$BUILD_DIR/mongo/client/clientdriver_network',
'$BUILD_DIR/mongo/client/fetcher',
'$BUILD_DIR/mongo/db/commands/server_status_core',
- '$BUILD_DIR/mongo/db/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'initial_sync_cloners',
'multiapplier',
'oplog',
@@ -1412,7 +1412,7 @@ env.Library(
'$BUILD_DIR/mongo/db/ops/write_ops_exec',
'$BUILD_DIR/mongo/db/pipeline/process_interface/mongo_process_interface',
'$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger_import',
- '$BUILD_DIR/mongo/db/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'$BUILD_DIR/mongo/executor/scoped_task_executor',
'cloner_utils',
'oplog',
@@ -1723,7 +1723,7 @@ if wiredtiger:
'$BUILD_DIR/mongo/db/service_context_test_fixture',
'$BUILD_DIR/mongo/db/stats/counters',
'$BUILD_DIR/mongo/db/storage/storage_control',
- '$BUILD_DIR/mongo/db/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'$BUILD_DIR/mongo/db/update/update_test_helpers',
'$BUILD_DIR/mongo/dbtests/mocklib',
'$BUILD_DIR/mongo/executor/network_interface_factory',
diff --git a/src/mongo/db/repl/apply_ops.cpp b/src/mongo/db/repl/apply_ops.cpp
index 8051c52fdd7..fe04751ae12 100644
--- a/src/mongo/db/repl/apply_ops.cpp
+++ b/src/mongo/db/repl/apply_ops.cpp
@@ -52,7 +52,7 @@
#include "mongo/db/repl/replication_coordinator.h"
#include "mongo/db/service_context.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#include "mongo/rpc/get_status_from_command_result.h"
#include "mongo/util/fail_point.h"
diff --git a/src/mongo/db/repl/initial_syncer.cpp b/src/mongo/db/repl/initial_syncer.cpp
index 5001927d8dc..deaaa4245cf 100644
--- a/src/mongo/db/repl/initial_syncer.cpp
+++ b/src/mongo/db/repl/initial_syncer.cpp
@@ -63,7 +63,7 @@
#include "mongo/db/repl/sync_source_selector.h"
#include "mongo/db/repl/tenant_migration_access_blocker_util.h"
#include "mongo/db/repl/transaction_oplog_application.h"
-#include "mongo/db/session_txn_record_gen.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
#include "mongo/executor/task_executor.h"
#include "mongo/executor/thread_pool_task_executor.h"
#include "mongo/logv2/log.h"
diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp
index 82796ee6c44..bfeb9a9ad09 100644
--- a/src/mongo/db/repl/oplog.cpp
+++ b/src/mongo/db/repl/oplog.cpp
@@ -98,7 +98,7 @@
#include "mongo/db/stats/server_write_concern_metrics.h"
#include "mongo/db/storage/storage_engine.h"
#include "mongo/db/storage/storage_options.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#include "mongo/platform/random.h"
#include "mongo/rpc/get_status_from_command_result.h"
diff --git a/src/mongo/db/repl/oplog_applier_impl_test.cpp b/src/mongo/db/repl/oplog_applier_impl_test.cpp
index 6d2d9b37d3e..63aa5ed2092 100644
--- a/src/mongo/db/repl/oplog_applier_impl_test.cpp
+++ b/src/mongo/db/repl/oplog_applier_impl_test.cpp
@@ -65,9 +65,9 @@
#include "mongo/db/repl/storage_interface.h"
#include "mongo/db/service_context_d_test_fixture.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/session_txn_record_gen.h"
#include "mongo/db/stats/counters.h"
-#include "mongo/db/transaction_participant_gen.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
+#include "mongo/db/transaction/transaction_participant_gen.h"
#include "mongo/db/update/update_oplog_entry_serialization.h"
#include "mongo/idl/server_parameter_test_util.h"
#include "mongo/platform/mutex.h"
diff --git a/src/mongo/db/repl/oplog_applier_impl_test_fixture.h b/src/mongo/db/repl/oplog_applier_impl_test_fixture.h
index afe2a9afa2b..7f78085ff7e 100644
--- a/src/mongo/db/repl/oplog_applier_impl_test_fixture.h
+++ b/src/mongo/db/repl/oplog_applier_impl_test_fixture.h
@@ -37,7 +37,7 @@
#include "mongo/db/repl/oplog_applier_impl.h"
#include "mongo/db/repl/replication_consistency_markers.h"
#include "mongo/db/service_context_d_test_fixture.h"
-#include "mongo/db/session_txn_record_gen.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
namespace mongo {
diff --git a/src/mongo/db/repl/oplog_interface.h b/src/mongo/db/repl/oplog_interface.h
index c930db7daaf..08f078542ce 100644
--- a/src/mongo/db/repl/oplog_interface.h
+++ b/src/mongo/db/repl/oplog_interface.h
@@ -36,7 +36,7 @@
#include "mongo/base/status_with.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/db/record_id.h"
-#include "mongo/db/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
#include "mongo/util/net/hostandport.h"
namespace mongo {
diff --git a/src/mongo/db/repl/oplog_interface_mock.cpp b/src/mongo/db/repl/oplog_interface_mock.cpp
index 95930bf6d62..767e58b8333 100644
--- a/src/mongo/db/repl/oplog_interface_mock.cpp
+++ b/src/mongo/db/repl/oplog_interface_mock.cpp
@@ -30,7 +30,7 @@
#include "mongo/platform/basic.h"
#include "mongo/db/repl/oplog_interface_mock.h"
-#include "mongo/db/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
namespace mongo {
namespace repl {
diff --git a/src/mongo/db/repl/replication_recovery.cpp b/src/mongo/db/repl/replication_recovery.cpp
index 6e6fcb0dfd5..ce4be2216b5 100644
--- a/src/mongo/db/repl/replication_recovery.cpp
+++ b/src/mongo/db/repl/replication_recovery.cpp
@@ -54,8 +54,8 @@
#include "mongo/db/storage/control/journal_flusher.h"
#include "mongo/db/storage/durable_history_pin.h"
#include "mongo/db/storage/storage_parameters_gen.h"
-#include "mongo/db/transaction_history_iterator.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#include "mongo/util/scopeguard.h"
#include "mongo/util/timer.h"
diff --git a/src/mongo/db/repl/replication_recovery_test.cpp b/src/mongo/db/repl/replication_recovery_test.cpp
index b31925a330a..f5c98d978a4 100644
--- a/src/mongo/db/repl/replication_recovery_test.cpp
+++ b/src/mongo/db/repl/replication_recovery_test.cpp
@@ -46,11 +46,11 @@
#include "mongo/db/repl/storage_interface_impl.h"
#include "mongo/db/service_context_d_test_fixture.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/session_txn_record_gen.h"
#include "mongo/db/storage/durable_history_pin.h"
#include "mongo/db/storage/storage_options.h"
#include "mongo/db/storage/storage_parameters_gen.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/update/update_oplog_entry_serialization.h"
#include "mongo/unittest/death_test.h"
#include "mongo/unittest/log_test.h"
diff --git a/src/mongo/db/repl/rollback_impl.cpp b/src/mongo/db/repl/rollback_impl.cpp
index e0dc5f6a020..b22a1be89ca 100644
--- a/src/mongo/db/repl/rollback_impl.cpp
+++ b/src/mongo/db/repl/rollback_impl.cpp
@@ -62,10 +62,10 @@
#include "mongo/db/s/type_shard_identity.h"
#include "mongo/db/server_recovery.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/session_txn_record_gen.h"
#include "mongo/db/storage/historical_ident_tracker.h"
#include "mongo/db/storage/remove_saver.h"
-#include "mongo/db/transaction_history_iterator.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
#include "mongo/logv2/log.h"
#include "mongo/s/catalog/type_config_version.h"
#include "mongo/util/scopeguard.h"
diff --git a/src/mongo/db/repl/rs_rollback.cpp b/src/mongo/db/repl/rs_rollback.cpp
index 10f4e85f720..32b3a7160c9 100644
--- a/src/mongo/db/repl/rs_rollback.cpp
+++ b/src/mongo/db/repl/rs_rollback.cpp
@@ -71,7 +71,7 @@
#include "mongo/db/session_catalog_mongod.h"
#include "mongo/db/storage/control/journal_flusher.h"
#include "mongo/db/storage/remove_saver.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#include "mongo/s/client/shard_registry.h"
#include "mongo/s/grid.h"
diff --git a/src/mongo/db/repl/session_update_tracker.cpp b/src/mongo/db/repl/session_update_tracker.cpp
index d2068db886d..c08d9121824 100644
--- a/src/mongo/db/repl/session_update_tracker.cpp
+++ b/src/mongo/db/repl/session_update_tracker.cpp
@@ -36,8 +36,8 @@
#include "mongo/db/repl/oplog_entry.h"
#include "mongo/db/server_options.h"
#include "mongo/db/session.h"
-#include "mongo/db/session_txn_record_gen.h"
-#include "mongo/db/transaction_participant_gen.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
+#include "mongo/db/transaction/transaction_participant_gen.h"
#include "mongo/db/update/update_oplog_entry_serialization.h"
#include "mongo/logv2/log.h"
#include "mongo/util/assert_util.h"
diff --git a/src/mongo/db/repl/storage_timestamp_test.cpp b/src/mongo/db/repl/storage_timestamp_test.cpp
index 3c687376795..4dcce2ef1ac 100644
--- a/src/mongo/db/repl/storage_timestamp_test.cpp
+++ b/src/mongo/db/repl/storage_timestamp_test.cpp
@@ -86,8 +86,8 @@
#include "mongo/db/session_catalog_mongod.h"
#include "mongo/db/storage/snapshot_manager.h"
#include "mongo/db/storage/storage_engine_impl.h"
-#include "mongo/db/transaction_participant.h"
-#include "mongo/db/transaction_participant_gen.h"
+#include "mongo/db/transaction/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant_gen.h"
#include "mongo/db/update/update_oplog_entry_serialization.h"
#include "mongo/db/vector_clock_mutable.h"
#include "mongo/dbtests/dbtests.h"
diff --git a/src/mongo/db/repl/tenant_migration_recipient_service.cpp b/src/mongo/db/repl/tenant_migration_recipient_service.cpp
index c84ba067ef8..26e3742f16f 100644
--- a/src/mongo/db/repl/tenant_migration_recipient_service.cpp
+++ b/src/mongo/db/repl/tenant_migration_recipient_service.cpp
@@ -70,9 +70,9 @@
#include "mongo/db/repl/tenant_migration_statistics.h"
#include "mongo/db/repl/wait_for_majority_service.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/session_txn_record_gen.h"
#include "mongo/db/storage/wiredtiger/wiredtiger_import.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/vector_clock_mutable.h"
#include "mongo/db/write_concern_options.h"
#include "mongo/logv2/log.h"
diff --git a/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp b/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp
index 0e7873e3cdc..fa112123d95 100644
--- a/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp
+++ b/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp
@@ -55,7 +55,7 @@
#include "mongo/db/repl/tenant_migration_state_machine_gen.h"
#include "mongo/db/repl/wait_for_majority_service.h"
#include "mongo/db/service_context_d_test_fixture.h"
-#include "mongo/db/session_txn_record_gen.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
#include "mongo/dbtests/mock/mock_conn_registry.h"
#include "mongo/dbtests/mock/mock_replica_set.h"
#include "mongo/executor/network_interface.h"
diff --git a/src/mongo/db/repl/tenant_oplog_applier.cpp b/src/mongo/db/repl/tenant_oplog_applier.cpp
index f5d1c0e1469..1c167fc7bec 100644
--- a/src/mongo/db/repl/tenant_oplog_applier.cpp
+++ b/src/mongo/db/repl/tenant_oplog_applier.cpp
@@ -52,7 +52,7 @@
#include "mongo/db/repl/tenant_migration_recipient_service.h"
#include "mongo/db/repl/tenant_oplog_batcher.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#include "mongo/util/concurrency/thread_pool.h"
diff --git a/src/mongo/db/repl/transaction_oplog_application.cpp b/src/mongo/db/repl/transaction_oplog_application.cpp
index dbe6dd12b74..6e647cf8432 100644
--- a/src/mongo/db/repl/transaction_oplog_application.cpp
+++ b/src/mongo/db/repl/transaction_oplog_application.cpp
@@ -41,8 +41,8 @@
#include "mongo/db/repl/storage_interface_impl.h"
#include "mongo/db/repl/timestamp_block.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_history_iterator.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication
diff --git a/src/mongo/db/s/SConscript b/src/mongo/db/s/SConscript
index 97fea863670..401fbb2cb6b 100644
--- a/src/mongo/db/s/SConscript
+++ b/src/mongo/db/s/SConscript
@@ -167,7 +167,7 @@ env.Library(
'$BUILD_DIR/mongo/db/rw_concern_d',
'$BUILD_DIR/mongo/db/server_options_core',
'$BUILD_DIR/mongo/db/storage/remove_saver',
- '$BUILD_DIR/mongo/db/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'$BUILD_DIR/mongo/db/vector_clock_mongod',
'$BUILD_DIR/mongo/s/query/cluster_aggregate',
'$BUILD_DIR/mongo/s/sharding_api',
@@ -235,7 +235,7 @@ env.Library(
'$BUILD_DIR/mongo/db/not_primary_error_tracker',
'$BUILD_DIR/mongo/db/repl/wait_for_majority_service',
'$BUILD_DIR/mongo/db/rw_concern_d',
- '$BUILD_DIR/mongo/db/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
'$BUILD_DIR/mongo/db/vector_clock_mongod',
'$BUILD_DIR/mongo/executor/task_executor_pool',
'$BUILD_DIR/mongo/s/grid',
@@ -320,8 +320,8 @@ env.Library(
'$BUILD_DIR/mongo/db/server_feature_flags',
'$BUILD_DIR/mongo/db/snapshot_window_options',
'$BUILD_DIR/mongo/db/timeseries/timeseries_options',
- '$BUILD_DIR/mongo/db/transaction',
- '$BUILD_DIR/mongo/db/transaction_api',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction_api',
'$BUILD_DIR/mongo/db/vector_clock_mongod',
'$BUILD_DIR/mongo/executor/network_interface',
'$BUILD_DIR/mongo/s/catalog/sharding_catalog_client_impl',
@@ -485,7 +485,7 @@ env.Library(
'$BUILD_DIR/mongo/db/timeseries/timeseries_collmod',
'$BUILD_DIR/mongo/db/timeseries/timeseries_conversion_util',
'$BUILD_DIR/mongo/db/timeseries/timeseries_options',
- '$BUILD_DIR/mongo/db/transaction_api',
+ '$BUILD_DIR/mongo/db/transaction/transaction_api',
'$BUILD_DIR/mongo/idl/cluster_server_parameter',
'$BUILD_DIR/mongo/s/commands/cluster_commands_common',
'$BUILD_DIR/mongo/s/commands/sharded_cluster_sharding_commands',
@@ -721,8 +721,8 @@ env.CppUnitTest(
'$BUILD_DIR/mongo/db/read_write_concern_defaults_mock',
'$BUILD_DIR/mongo/db/repl/replication_info',
'$BUILD_DIR/mongo/db/timeseries/timeseries_options',
- '$BUILD_DIR/mongo/db/transaction',
- '$BUILD_DIR/mongo/db/transaction_api',
+ '$BUILD_DIR/mongo/db/transaction/transaction',
+ '$BUILD_DIR/mongo/db/transaction/transaction_api',
'$BUILD_DIR/mongo/util/version_impl',
'config_server_test_fixture',
],
diff --git a/src/mongo/db/s/config/configsvr_remove_chunks_command.cpp b/src/mongo/db/s/config/configsvr_remove_chunks_command.cpp
index da6ec5ed2b9..5f69b19808d 100644
--- a/src/mongo/db/s/config/configsvr_remove_chunks_command.cpp
+++ b/src/mongo/db/s/config/configsvr_remove_chunks_command.cpp
@@ -37,7 +37,7 @@
#include "mongo/db/repl/repl_client_info.h"
#include "mongo/db/s/remove_chunks_gen.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/catalog/type_chunk.h"
#include "mongo/s/grid.h"
diff --git a/src/mongo/db/s/config/configsvr_remove_tags_command.cpp b/src/mongo/db/s/config/configsvr_remove_tags_command.cpp
index 7333b0036dc..918e7b92348 100644
--- a/src/mongo/db/s/config/configsvr_remove_tags_command.cpp
+++ b/src/mongo/db/s/config/configsvr_remove_tags_command.cpp
@@ -37,7 +37,7 @@
#include "mongo/db/repl/repl_client_info.h"
#include "mongo/db/s/remove_tags_gen.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/s/catalog/sharding_catalog_client.h"
#include "mongo/s/catalog/type_tags.h"
#include "mongo/s/grid.h"
diff --git a/src/mongo/db/s/config/configsvr_rename_collection_metadata_command.cpp b/src/mongo/db/s/config/configsvr_rename_collection_metadata_command.cpp
index df59c5135ea..cfd4f40a3bf 100644
--- a/src/mongo/db/s/config/configsvr_rename_collection_metadata_command.cpp
+++ b/src/mongo/db/s/config/configsvr_rename_collection_metadata_command.cpp
@@ -36,7 +36,7 @@
#include "mongo/db/dbdirectclient.h"
#include "mongo/db/s/config/sharding_catalog_manager.h"
#include "mongo/db/s/sharding_ddl_util.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/s/grid.h"
#include "mongo/s/request_types/sharded_ddl_commands_gen.h"
diff --git a/src/mongo/db/s/config/sharding_catalog_manager.h b/src/mongo/db/s/config/sharding_catalog_manager.h
index 28e095986ea..7310fe98c08 100644
--- a/src/mongo/db/s/config/sharding_catalog_manager.h
+++ b/src/mongo/db/s/config/sharding_catalog_manager.h
@@ -36,7 +36,7 @@
#include "mongo/db/logical_session_cache.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/repl/optime_with.h"
-#include "mongo/db/transaction_api.h"
+#include "mongo/db/transaction/transaction_api.h"
#include "mongo/executor/task_executor.h"
#include "mongo/platform/mutex.h"
#include "mongo/s/catalog/type_chunk.h"
diff --git a/src/mongo/db/s/config/sharding_catalog_manager_bump_collection_version_and_change_metadata_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_bump_collection_version_and_change_metadata_test.cpp
index fbb502f933b..97f8ced0db6 100644
--- a/src/mongo/db/s/config/sharding_catalog_manager_bump_collection_version_and_change_metadata_test.cpp
+++ b/src/mongo/db/s/config/sharding_catalog_manager_bump_collection_version_and_change_metadata_test.cpp
@@ -35,7 +35,7 @@
#include "mongo/db/s/config/sharding_catalog_manager.h"
#include "mongo/db/s/transaction_coordinator_service.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#include "mongo/util/fail_point.h"
diff --git a/src/mongo/db/s/config/sharding_catalog_manager_chunk_operations.cpp b/src/mongo/db/s/config/sharding_catalog_manager_chunk_operations.cpp
index 459fdef0061..a7461607eed 100644
--- a/src/mongo/db/s/config/sharding_catalog_manager_chunk_operations.cpp
+++ b/src/mongo/db/s/config/sharding_catalog_manager_chunk_operations.cpp
@@ -45,8 +45,8 @@
#include "mongo/db/s/sharding_util.h"
#include "mongo/db/server_options.h"
#include "mongo/db/snapshot_window_options_gen.h"
-#include "mongo/db/transaction_api.h"
-#include "mongo/db/transaction_participant_gen.h"
+#include "mongo/db/transaction/transaction_api.h"
+#include "mongo/db/transaction/transaction_participant_gen.h"
#include "mongo/logv2/log.h"
#include "mongo/rpc/get_status_from_command_result.h"
#include "mongo/s/balancer_configuration.h"
diff --git a/src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp b/src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp
index 053e351cd6d..5ee5f2dccce 100644
--- a/src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp
+++ b/src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp
@@ -59,7 +59,7 @@
#include "mongo/db/s/sharding_logging.h"
#include "mongo/db/s/sharding_util.h"
#include "mongo/db/timeseries/timeseries_options.h"
-#include "mongo/db/transaction_api.h"
+#include "mongo/db/transaction/transaction_api.h"
#include "mongo/db/vector_clock.h"
#include "mongo/executor/network_interface.h"
#include "mongo/executor/task_executor.h"
diff --git a/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp b/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp
index 333ea221c12..34fdefaecd5 100644
--- a/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp
+++ b/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp
@@ -65,7 +65,7 @@
#include "mongo/db/s/type_shard_identity.h"
#include "mongo/db/s/user_writes_critical_section_document_gen.h"
#include "mongo/db/s/user_writes_recoverable_critical_section_service.h"
-#include "mongo/db/transaction_api.h"
+#include "mongo/db/transaction/transaction_api.h"
#include "mongo/db/vector_clock_mutable.h"
#include "mongo/db/wire_version.h"
#include "mongo/executor/task_executor.h"
diff --git a/src/mongo/db/s/global_index/global_index_inserter.cpp b/src/mongo/db/s/global_index/global_index_inserter.cpp
index a6fdff72993..eff9cd7073e 100644
--- a/src/mongo/db/s/global_index/global_index_inserter.cpp
+++ b/src/mongo/db/s/global_index/global_index_inserter.cpp
@@ -32,7 +32,7 @@
#include <fmt/format.h>
#include "mongo/db/s/global_index/global_index_entry_gen.h"
-#include "mongo/db/transaction_api.h"
+#include "mongo/db/transaction/transaction_api.h"
#include "mongo/logv2/log.h"
#include "mongo/util/fail_point.h"
diff --git a/src/mongo/db/s/migration_destination_manager.cpp b/src/mongo/db/s/migration_destination_manager.cpp
index d9be4951278..a4f64ff996e 100644
--- a/src/mongo/db/s/migration_destination_manager.cpp
+++ b/src/mongo/db/s/migration_destination_manager.cpp
@@ -68,7 +68,7 @@
#include "mongo/db/service_context.h"
#include "mongo/db/session_catalog_mongod.h"
#include "mongo/db/storage/remove_saver.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/vector_clock.h"
#include "mongo/db/write_block_bypass.h"
#include "mongo/logv2/log.h"
diff --git a/src/mongo/db/s/resharding/document_source_resharding_iterate_transaction.cpp b/src/mongo/db/s/resharding/document_source_resharding_iterate_transaction.cpp
index c37eb05fc80..886692b716c 100644
--- a/src/mongo/db/s/resharding/document_source_resharding_iterate_transaction.cpp
+++ b/src/mongo/db/s/resharding/document_source_resharding_iterate_transaction.cpp
@@ -33,7 +33,7 @@
#include "mongo/db/s/resharding/document_source_resharding_iterate_transaction.h"
#include "mongo/db/commands/txn_cmds_gen.h"
-#include "mongo/db/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand
diff --git a/src/mongo/db/s/resharding/document_source_resharding_ownership_match.cpp b/src/mongo/db/s/resharding/document_source_resharding_ownership_match.cpp
index fa2561ff1cd..00421dabd5a 100644
--- a/src/mongo/db/s/resharding/document_source_resharding_ownership_match.cpp
+++ b/src/mongo/db/s/resharding/document_source_resharding_ownership_match.cpp
@@ -33,7 +33,7 @@
#include "mongo/db/s/resharding/document_source_resharding_ownership_match.h"
#include "mongo/db/s/resharding/resharding_util.h"
-#include "mongo/db/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
#include "mongo/s/catalog_cache.h"
#include "mongo/s/grid.h"
#include "mongo/s/resharding/common_types_gen.h"
diff --git a/src/mongo/db/s/resharding/resharding_agg_test.cpp b/src/mongo/db/s/resharding/resharding_agg_test.cpp
index 9c2f9fcba23..88e243a27bf 100644
--- a/src/mongo/db/s/resharding/resharding_agg_test.cpp
+++ b/src/mongo/db/s/resharding/resharding_agg_test.cpp
@@ -41,7 +41,7 @@
#include "mongo/db/s/resharding/resharding_donor_oplog_iterator.h"
#include "mongo/db/s/resharding/resharding_util.h"
#include "mongo/db/service_context_d_test_fixture.h"
-#include "mongo/db/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
#include "mongo/unittest/unittest.h"
#include "mongo/util/str.h"
diff --git a/src/mongo/db/s/resharding/resharding_data_copy_util.cpp b/src/mongo/db/s/resharding/resharding_data_copy_util.cpp
index c63a02bfb5c..4d9c16d31f3 100644
--- a/src/mongo/db/s/resharding/resharding_data_copy_util.cpp
+++ b/src/mongo/db/s/resharding/resharding_data_copy_util.cpp
@@ -45,9 +45,9 @@
#include "mongo/db/s/resharding/resharding_util.h"
#include "mongo/db/s/session_catalog_migration.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/session_txn_record_gen.h"
#include "mongo/db/storage/write_unit_of_work.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/redaction.h"
#include "mongo/util/scopeguard.h"
diff --git a/src/mongo/db/s/resharding/resharding_destined_recipient_test.cpp b/src/mongo/db/s/resharding/resharding_destined_recipient_test.cpp
index d81662f968c..3283fde2e4f 100644
--- a/src/mongo/db/s/resharding/resharding_destined_recipient_test.cpp
+++ b/src/mongo/db/s/resharding/resharding_destined_recipient_test.cpp
@@ -41,7 +41,7 @@
#include "mongo/db/s/sharding_state.h"
#include "mongo/db/s/sharding_write_router.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/s/catalog/sharding_catalog_client_mock.h"
#include "mongo/s/catalog/type_shard.h"
#include "mongo/s/catalog_cache_loader_mock.h"
diff --git a/src/mongo/db/s/resharding/resharding_oplog_application.cpp b/src/mongo/db/s/resharding/resharding_oplog_application.cpp
index d0214736e61..5a056f0ffbc 100644
--- a/src/mongo/db/s/resharding/resharding_oplog_application.cpp
+++ b/src/mongo/db/s/resharding/resharding_oplog_application.cpp
@@ -48,7 +48,7 @@
#include "mongo/db/s/resharding/resharding_server_parameters_gen.h"
#include "mongo/db/session_catalog_mongod.h"
#include "mongo/db/stats/counters.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#include "mongo/s/sharding_feature_flags_gen.h"
diff --git a/src/mongo/db/s/resharding/resharding_oplog_applier_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_applier_test.cpp
index 268147678c3..12c1d94c323 100644
--- a/src/mongo/db/s/resharding/resharding_oplog_applier_test.cpp
+++ b/src/mongo/db/s/resharding/resharding_oplog_applier_test.cpp
@@ -47,7 +47,7 @@
#include "mongo/db/s/sharding_mongod_test_fixture.h"
#include "mongo/db/s/sharding_state.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/update/update_oplog_entry_serialization.h"
#include "mongo/db/vector_clock_metadata_hook.h"
#include "mongo/executor/network_interface_factory.h"
diff --git a/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp
index b51b731cb01..963240e224f 100644
--- a/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp
+++ b/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp
@@ -50,7 +50,7 @@
#include "mongo/db/s/resharding/resharding_util.h"
#include "mongo/db/service_context_d_test_fixture.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/vector_clock_metadata_hook.h"
#include "mongo/executor/network_interface_factory.h"
#include "mongo/executor/thread_pool_task_executor.h"
diff --git a/src/mongo/db/s/resharding/resharding_oplog_session_application.cpp b/src/mongo/db/s/resharding/resharding_oplog_session_application.cpp
index 80338642587..ea59c3b1253 100644
--- a/src/mongo/db/s/resharding/resharding_oplog_session_application.cpp
+++ b/src/mongo/db/s/resharding/resharding_oplog_session_application.cpp
@@ -38,7 +38,7 @@
#include "mongo/db/repl/oplog_entry.h"
#include "mongo/db/s/resharding/resharding_data_copy_util.h"
#include "mongo/db/storage/write_unit_of_work.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/redaction.h"
namespace mongo {
diff --git a/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp
index a2a817a9fe8..4093e8b6176 100644
--- a/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp
+++ b/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp
@@ -44,7 +44,7 @@
#include "mongo/db/s/resharding/resharding_oplog_session_application.h"
#include "mongo/db/service_context_d_test_fixture.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/unittest/death_test.h"
#include "mongo/unittest/unittest.h"
diff --git a/src/mongo/db/s/resharding/resharding_txn_cloner.cpp b/src/mongo/db/s/resharding/resharding_txn_cloner.cpp
index 1f074af6f75..2062ed99402 100644
--- a/src/mongo/db/s/resharding/resharding_txn_cloner.cpp
+++ b/src/mongo/db/s/resharding/resharding_txn_cloner.cpp
@@ -56,8 +56,8 @@
#include "mongo/db/s/resharding/resharding_txn_cloner_progress_gen.h"
#include "mongo/db/s/session_catalog_migration_destination.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/session_txn_record_gen.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#include "mongo/util/scopeguard.h"
diff --git a/src/mongo/db/s/resharding/resharding_txn_cloner.h b/src/mongo/db/s/resharding/resharding_txn_cloner.h
index 3fb7c302cae..2653ba9fc0a 100644
--- a/src/mongo/db/s/resharding/resharding_txn_cloner.h
+++ b/src/mongo/db/s/resharding/resharding_txn_cloner.h
@@ -38,7 +38,7 @@
#include "mongo/db/pipeline/expression_context.h"
#include "mongo/db/pipeline/pipeline.h"
#include "mongo/db/service_context.h"
-#include "mongo/db/session_txn_record_gen.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
#include "mongo/s/resharding/common_types_gen.h"
#include "mongo/util/future.h"
diff --git a/src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp b/src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp
index 5bed4197a57..ee0c6c00b83 100644
--- a/src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp
+++ b/src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp
@@ -46,8 +46,8 @@
#include "mongo/db/s/shard_server_test_fixture.h"
#include "mongo/db/s/sharding_state.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/session_txn_record_gen.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/vector_clock_metadata_hook.h"
#include "mongo/executor/network_interface_factory.h"
#include "mongo/executor/thread_pool_task_executor.h"
diff --git a/src/mongo/db/s/resharding/resharding_util_test.cpp b/src/mongo/db/s/resharding/resharding_util_test.cpp
index 12e5e15ddcd..69daa55bd00 100644
--- a/src/mongo/db/s/resharding/resharding_util_test.cpp
+++ b/src/mongo/db/s/resharding/resharding_util_test.cpp
@@ -43,7 +43,7 @@
#include "mongo/db/s/config/config_server_test_fixture.h"
#include "mongo/db/s/resharding/resharding_txn_cloner.h"
#include "mongo/db/s/resharding/resharding_util.h"
-#include "mongo/db/session_txn_record_gen.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
#include "mongo/s/catalog/type_shard.h"
#include "mongo/s/shard_id.h"
#include "mongo/unittest/unittest.h"
diff --git a/src/mongo/db/s/session_catalog_migration_destination.cpp b/src/mongo/db/s/session_catalog_migration_destination.cpp
index 8c9a1b8cb32..16d65ac4361 100644
--- a/src/mongo/db/s/session_catalog_migration_destination.cpp
+++ b/src/mongo/db/s/session_catalog_migration_destination.cpp
@@ -46,7 +46,7 @@
#include "mongo/db/s/migration_session_id.h"
#include "mongo/db/s/session_catalog_migration.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/write_concern.h"
#include "mongo/logv2/log.h"
#include "mongo/logv2/redaction.h"
diff --git a/src/mongo/db/s/session_catalog_migration_destination_test.cpp b/src/mongo/db/s/session_catalog_migration_destination_test.cpp
index 2dc41e842ca..cd7ad89f176 100644
--- a/src/mongo/db/s/session_catalog_migration_destination_test.cpp
+++ b/src/mongo/db/s/session_catalog_migration_destination_test.cpp
@@ -50,9 +50,9 @@
#include "mongo/db/s/shard_server_test_fixture.h"
#include "mongo/db/server_options.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/session_txn_record_gen.h"
-#include "mongo/db/transaction_history_iterator.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/executor/remote_command_request.h"
#include "mongo/s/catalog/sharding_catalog_client_mock.h"
#include "mongo/s/catalog/type_shard.h"
diff --git a/src/mongo/db/s/session_catalog_migration_source.cpp b/src/mongo/db/s/session_catalog_migration_source.cpp
index ec7513d7a84..40f93318f26 100644
--- a/src/mongo/db/s/session_catalog_migration_source.cpp
+++ b/src/mongo/db/s/session_catalog_migration_source.cpp
@@ -46,9 +46,9 @@
#include "mongo/db/repl/replication_process.h"
#include "mongo/db/s/session_catalog_migration.h"
#include "mongo/db/session.h"
-#include "mongo/db/session_txn_record_gen.h"
-#include "mongo/db/transaction_history_iterator.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/write_concern.h"
#include "mongo/platform/random.h"
#include "mongo/s/catalog/type_chunk.h"
diff --git a/src/mongo/db/s/session_catalog_migration_source.h b/src/mongo/db/s/session_catalog_migration_source.h
index f3b87baf7fe..37e61b6916a 100644
--- a/src/mongo/db/s/session_catalog_migration_source.h
+++ b/src/mongo/db/s/session_catalog_migration_source.h
@@ -35,8 +35,8 @@
#include "mongo/client/dbclient_cursor.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/repl/optime.h"
-#include "mongo/db/session_txn_record_gen.h"
-#include "mongo/db/transaction_history_iterator.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
#include "mongo/platform/mutex.h"
#include "mongo/s/catalog/type_chunk.h"
#include "mongo/s/shard_key_pattern.h"
diff --git a/src/mongo/db/s/session_catalog_migration_source_test.cpp b/src/mongo/db/s/session_catalog_migration_source_test.cpp
index 62bba20660b..be0dbddaf89 100644
--- a/src/mongo/db/s/session_catalog_migration_source_test.cpp
+++ b/src/mongo/db/s/session_catalog_migration_source_test.cpp
@@ -46,8 +46,8 @@
#include "mongo/db/s/session_catalog_migration_source.h"
#include "mongo/db/session.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/session_txn_record_gen.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/executor/remote_command_request.h"
#include "mongo/unittest/bson_test_util.h"
#include "mongo/unittest/death_test.h"
diff --git a/src/mongo/db/s/shardsvr_create_collection_participant_command.cpp b/src/mongo/db/s/shardsvr_create_collection_participant_command.cpp
index 4157f1145f8..477816576f5 100644
--- a/src/mongo/db/s/shardsvr_create_collection_participant_command.cpp
+++ b/src/mongo/db/s/shardsvr_create_collection_participant_command.cpp
@@ -34,7 +34,7 @@
#include "mongo/db/dbdirectclient.h"
#include "mongo/db/s/migration_destination_manager.h"
#include "mongo/db/s/sharding_state.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/s/request_types/sharded_ddl_commands_gen.h"
#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand
diff --git a/src/mongo/db/s/shardsvr_drop_collection_participant_command.cpp b/src/mongo/db/s/shardsvr_drop_collection_participant_command.cpp
index 31c19139c38..ab9849b55ac 100644
--- a/src/mongo/db/s/shardsvr_drop_collection_participant_command.cpp
+++ b/src/mongo/db/s/shardsvr_drop_collection_participant_command.cpp
@@ -37,7 +37,7 @@
#include "mongo/db/s/collection_sharding_runtime.h"
#include "mongo/db/s/drop_collection_coordinator.h"
#include "mongo/db/s/sharding_state.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#include "mongo/s/request_types/sharded_ddl_commands_gen.h"
diff --git a/src/mongo/db/s/shardsvr_rename_collection_participant_command.cpp b/src/mongo/db/s/shardsvr_rename_collection_participant_command.cpp
index 28e893755ef..56cc878e578 100644
--- a/src/mongo/db/s/shardsvr_rename_collection_participant_command.cpp
+++ b/src/mongo/db/s/shardsvr_rename_collection_participant_command.cpp
@@ -36,7 +36,7 @@
#include "mongo/db/s/rename_collection_participant_service.h"
#include "mongo/db/s/sharded_rename_collection_gen.h"
#include "mongo/db/s/sharding_state.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/write_concern.h"
#include "mongo/logv2/log.h"
diff --git a/src/mongo/db/s/transaction_coordinator_factory_mongod.cpp b/src/mongo/db/s/transaction_coordinator_factory_mongod.cpp
index 90a8caccc2b..cf8882bd82a 100644
--- a/src/mongo/db/s/transaction_coordinator_factory_mongod.cpp
+++ b/src/mongo/db/s/transaction_coordinator_factory_mongod.cpp
@@ -32,8 +32,8 @@
#include "mongo/base/shim.h"
#include "mongo/db/s/transaction_coordinator_factory.h"
#include "mongo/db/s/transaction_coordinator_service.h"
-#include "mongo/db/transaction_participant.h"
-#include "mongo/db/transaction_participant_gen.h"
+#include "mongo/db/transaction/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant_gen.h"
namespace mongo {
namespace {
diff --git a/src/mongo/db/s/transaction_coordinator_service.cpp b/src/mongo/db/s/transaction_coordinator_service.cpp
index 61d7a45f40c..8e97d80b27e 100644
--- a/src/mongo/db/s/transaction_coordinator_service.cpp
+++ b/src/mongo/db/s/transaction_coordinator_service.cpp
@@ -37,7 +37,7 @@
#include "mongo/db/s/transaction_coordinator_document_gen.h"
#include "mongo/db/s/transaction_coordinator_params_gen.h"
#include "mongo/db/storage/flow_control.h"
-#include "mongo/db/transaction_participant_gen.h"
+#include "mongo/db/transaction/transaction_participant_gen.h"
#include "mongo/db/write_concern.h"
#include "mongo/logv2/log.h"
#include "mongo/s/grid.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 dd4b94aae1c..3549e09d2d1 100644
--- a/src/mongo/db/s/txn_two_phase_commit_cmds.cpp
+++ b/src/mongo/db/s/txn_two_phase_commit_cmds.cpp
@@ -39,7 +39,7 @@
#include "mongo/db/s/sharding_state.h"
#include "mongo/db/s/transaction_coordinator_service.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#include "mongo/rpc/get_status_from_command_result.h"
diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp
index b0a79bfde84..e9a08fded83 100644
--- a/src/mongo/db/service_entry_point_common.cpp
+++ b/src/mongo/db/service_entry_point_common.cpp
@@ -87,7 +87,7 @@
#include "mongo/db/stats/resource_consumption_metrics.h"
#include "mongo/db/stats/server_read_concern_metrics.h"
#include "mongo/db/stats/top.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/db/transaction_validation.h"
#include "mongo/db/vector_clock.h"
#include "mongo/logv2/log.h"
diff --git a/src/mongo/db/session_catalog_mongod.cpp b/src/mongo/db/session_catalog_mongod.cpp
index 4c91937f48f..96e24cf4b41 100644
--- a/src/mongo/db/session_catalog_mongod.cpp
+++ b/src/mongo/db/session_catalog_mongod.cpp
@@ -45,9 +45,9 @@
#include "mongo/db/repl/repl_server_parameters_gen.h"
#include "mongo/db/repl/storage_interface_impl.h"
#include "mongo/db/service_context.h"
-#include "mongo/db/session_txn_record_gen.h"
#include "mongo/db/sessions_collection.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/logv2/log.h"
#include "mongo/rpc/get_status_from_command_result.h"
#include "mongo/s/transaction_router.h"
diff --git a/src/mongo/db/session_catalog_mongod_test.cpp b/src/mongo/db/session_catalog_mongod_test.cpp
index 1b4ea856605..80afc0f4d9a 100644
--- a/src/mongo/db/session_catalog_mongod_test.cpp
+++ b/src/mongo/db/session_catalog_mongod_test.cpp
@@ -33,8 +33,8 @@
#include "mongo/db/repl/replication_coordinator_mock.h"
#include "mongo/db/service_context_d_test_fixture.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/session_txn_record_gen.h"
#include "mongo/db/sessions_collection_mock.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
#include "mongo/util/clock_source_mock.h"
namespace mongo {
diff --git a/src/mongo/db/transaction/SConscript b/src/mongo/db/transaction/SConscript
new file mode 100644
index 00000000000..234612b827f
--- /dev/null
+++ b/src/mongo/db/transaction/SConscript
@@ -0,0 +1,78 @@
+# -*- mode: python -*-
+
+Import("env")
+
+env = env.Clone()
+
+env.Library(
+ target='transaction',
+ source=[
+ '$BUILD_DIR/mongo/db/session_catalog_mongod.cpp',
+ 'internal_transactions_reap_service.cpp',
+ 'retryable_writes_stats.cpp',
+ 'server_transactions_metrics.cpp',
+ 'transaction_history_iterator.cpp',
+ 'transaction_metrics_observer.cpp',
+ 'transaction_participant.cpp',
+ 'transaction_participant_resource_yielder.cpp',
+ 'internal_transactions_reap_service.idl',
+ 'session_txn_record.idl',
+ 'transaction_participant.idl',
+ 'transactions_stats.idl',
+ ],
+ LIBDEPS_PRIVATE=[
+ '$BUILD_DIR/mongo/db/catalog/collection_catalog',
+ '$BUILD_DIR/mongo/db/catalog/database_holder',
+ '$BUILD_DIR/mongo/db/catalog/local_oplog_info',
+ '$BUILD_DIR/mongo/db/catalog_raii',
+ '$BUILD_DIR/mongo/db/commands/server_status',
+ '$BUILD_DIR/mongo/db/commands/test_commands_enabled',
+ '$BUILD_DIR/mongo/db/commands/txn_cmd_request',
+ '$BUILD_DIR/mongo/db/concurrency/exception_util',
+ '$BUILD_DIR/mongo/db/curop_failpoint_helpers',
+ '$BUILD_DIR/mongo/db/dbdirectclient',
+ '$BUILD_DIR/mongo/db/index/index_access_method',
+ '$BUILD_DIR/mongo/db/index_builds_coordinator_interface',
+ '$BUILD_DIR/mongo/db/index_commands_idl',
+ '$BUILD_DIR/mongo/db/internal_transactions_feature_flag',
+ '$BUILD_DIR/mongo/db/multitenancy',
+ '$BUILD_DIR/mongo/db/not_primary_error_tracker',
+ '$BUILD_DIR/mongo/db/query_exec',
+ '$BUILD_DIR/mongo/db/repl/apply_ops_command_info',
+ '$BUILD_DIR/mongo/db/repl/repl_server_parameters',
+ '$BUILD_DIR/mongo/db/repl/replica_set_aware_service',
+ '$BUILD_DIR/mongo/db/session_catalog',
+ '$BUILD_DIR/mongo/db/stats/fill_locker_info',
+ '$BUILD_DIR/mongo/db/stats/top',
+ '$BUILD_DIR/mongo/db/stats/transaction_stats',
+ '$BUILD_DIR/mongo/db/update/update_driver',
+ '$BUILD_DIR/mongo/idl/idl_parser',
+ '$BUILD_DIR/mongo/idl/server_parameter',
+ '$BUILD_DIR/mongo/s/sharding_router_api',
+ '$BUILD_DIR/mongo/util/concurrency/thread_pool',
+ ],
+)
+
+env.Library(
+ target='transaction_api',
+ source=[
+ 'transaction_api.cpp',
+ ],
+ LIBDEPS_PRIVATE=[
+ '$BUILD_DIR/mongo/db/auth/auth',
+ '$BUILD_DIR/mongo/db/logical_session_id',
+ '$BUILD_DIR/mongo/db/logical_session_id_helpers',
+ '$BUILD_DIR/mongo/db/operation_time_tracker',
+ '$BUILD_DIR/mongo/db/query/command_request_response',
+ '$BUILD_DIR/mongo/db/query/query_request',
+ '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
+ '$BUILD_DIR/mongo/db/s/sharding_api_d',
+ '$BUILD_DIR/mongo/db/service_context',
+ '$BUILD_DIR/mongo/db/session_catalog',
+ '$BUILD_DIR/mongo/db/shared_request_handling',
+ '$BUILD_DIR/mongo/executor/task_executor_interface',
+ '$BUILD_DIR/mongo/rpc/command_status',
+ '$BUILD_DIR/mongo/rpc/rpc',
+ '$BUILD_DIR/mongo/transport/service_entry_point',
+ ],
+)
diff --git a/src/mongo/db/internal_transactions_reap_service.cpp b/src/mongo/db/transaction/internal_transactions_reap_service.cpp
index ab3080ba889..280ed58a66e 100644
--- a/src/mongo/db/internal_transactions_reap_service.cpp
+++ b/src/mongo/db/transaction/internal_transactions_reap_service.cpp
@@ -27,10 +27,10 @@
* it in the license file.
*/
-#include "mongo/db/internal_transactions_reap_service.h"
+#include "mongo/db/transaction/internal_transactions_reap_service.h"
-#include "mongo/db/internal_transactions_reap_service_gen.h"
#include "mongo/db/session_catalog_mongod.h"
+#include "mongo/db/transaction/internal_transactions_reap_service_gen.h"
#include "mongo/logv2/log.h"
#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction
diff --git a/src/mongo/db/internal_transactions_reap_service.h b/src/mongo/db/transaction/internal_transactions_reap_service.h
index 75fd5aba30b..75fd5aba30b 100644
--- a/src/mongo/db/internal_transactions_reap_service.h
+++ b/src/mongo/db/transaction/internal_transactions_reap_service.h
diff --git a/src/mongo/db/internal_transactions_reap_service.idl b/src/mongo/db/transaction/internal_transactions_reap_service.idl
index 86c8997f3aa..86c8997f3aa 100644
--- a/src/mongo/db/internal_transactions_reap_service.idl
+++ b/src/mongo/db/transaction/internal_transactions_reap_service.idl
diff --git a/src/mongo/db/internal_transactions_reap_service_test.cpp b/src/mongo/db/transaction/internal_transactions_reap_service_test.cpp
index 0e9d956b627..3b9b3e3111c 100644
--- a/src/mongo/db/internal_transactions_reap_service_test.cpp
+++ b/src/mongo/db/transaction/internal_transactions_reap_service_test.cpp
@@ -28,15 +28,15 @@
*/
#include "mongo/db/dbdirectclient.h"
-#include "mongo/db/internal_transactions_reap_service.h"
-#include "mongo/db/internal_transactions_reap_service_gen.h"
#include "mongo/db/repl/image_collection_entry_gen.h"
#include "mongo/db/repl/replica_set_aware_service.h"
#include "mongo/db/repl/replication_coordinator_mock.h"
#include "mongo/db/repl/storage_interface_impl.h"
#include "mongo/db/service_context_d_test_fixture.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/session_txn_record_gen.h"
+#include "mongo/db/transaction/internal_transactions_reap_service.h"
+#include "mongo/db/transaction/internal_transactions_reap_service_gen.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
namespace mongo {
namespace {
diff --git a/src/mongo/db/retryable_writes_stats.cpp b/src/mongo/db/transaction/retryable_writes_stats.cpp
index fa84079d6f8..4235ccfa10e 100644
--- a/src/mongo/db/retryable_writes_stats.cpp
+++ b/src/mongo/db/transaction/retryable_writes_stats.cpp
@@ -29,13 +29,13 @@
#include "mongo/platform/basic.h"
-#include "mongo/db/retryable_writes_stats.h"
+#include "mongo/db/transaction/retryable_writes_stats.h"
#include "mongo/db/commands/server_status.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/service_context.h"
-#include "mongo/db/transactions_stats_gen.h"
+#include "mongo/db/transaction/transactions_stats_gen.h"
namespace mongo {
namespace {
diff --git a/src/mongo/db/retryable_writes_stats.h b/src/mongo/db/transaction/retryable_writes_stats.h
index f2ba00e5e23..6172209ae91 100644
--- a/src/mongo/db/retryable_writes_stats.h
+++ b/src/mongo/db/transaction/retryable_writes_stats.h
@@ -31,7 +31,7 @@
#include "mongo/db/operation_context.h"
#include "mongo/db/service_context.h"
-#include "mongo/db/transactions_stats_gen.h"
+#include "mongo/db/transaction/transactions_stats_gen.h"
#include "mongo/platform/atomic_word.h"
namespace mongo {
diff --git a/src/mongo/db/server_transactions_metrics.cpp b/src/mongo/db/transaction/server_transactions_metrics.cpp
index 411e898dbe3..c25edced5ff 100644
--- a/src/mongo/db/server_transactions_metrics.cpp
+++ b/src/mongo/db/transaction/server_transactions_metrics.cpp
@@ -29,15 +29,15 @@
#include "mongo/platform/basic.h"
-#include "mongo/db/server_transactions_metrics.h"
+#include "mongo/db/transaction/server_transactions_metrics.h"
#include "mongo/db/commands/server_status.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/repl/optime.h"
-#include "mongo/db/retryable_writes_stats.h"
#include "mongo/db/service_context.h"
-#include "mongo/db/transactions_stats_gen.h"
+#include "mongo/db/transaction/retryable_writes_stats.h"
+#include "mongo/db/transaction/transactions_stats_gen.h"
namespace mongo {
namespace {
diff --git a/src/mongo/db/server_transactions_metrics.h b/src/mongo/db/transaction/server_transactions_metrics.h
index d17742dd5b6..2c3ee8d6f07 100644
--- a/src/mongo/db/server_transactions_metrics.h
+++ b/src/mongo/db/transaction/server_transactions_metrics.h
@@ -35,7 +35,7 @@
#include "mongo/db/operation_context.h"
#include "mongo/db/repl/optime.h"
#include "mongo/db/service_context.h"
-#include "mongo/db/transactions_stats_gen.h"
+#include "mongo/db/transaction/transactions_stats_gen.h"
#include "mongo/platform/mutex.h"
#include "mongo/util/concurrency/with_lock.h"
diff --git a/src/mongo/db/session_txn_record.idl b/src/mongo/db/transaction/session_txn_record.idl
index 6970de0247d..6970de0247d 100644
--- a/src/mongo/db/session_txn_record.idl
+++ b/src/mongo/db/transaction/session_txn_record.idl
diff --git a/src/mongo/db/transaction_api.cpp b/src/mongo/db/transaction/transaction_api.cpp
index 766c0b86239..0d3bef20132 100644
--- a/src/mongo/db/transaction_api.cpp
+++ b/src/mongo/db/transaction/transaction_api.cpp
@@ -28,7 +28,7 @@
*/
-#include "mongo/db/transaction_api.h"
+#include "mongo/db/transaction/transaction_api.h"
#include <fmt/format.h>
diff --git a/src/mongo/db/transaction_api.h b/src/mongo/db/transaction/transaction_api.h
index 9a04c121eba..9a04c121eba 100644
--- a/src/mongo/db/transaction_api.h
+++ b/src/mongo/db/transaction/transaction_api.h
diff --git a/src/mongo/db/transaction_api_test.cpp b/src/mongo/db/transaction/transaction_api_test.cpp
index f2486a72bfa..d6a6175ca6c 100644
--- a/src/mongo/db/transaction_api_test.cpp
+++ b/src/mongo/db/transaction/transaction_api_test.cpp
@@ -39,7 +39,7 @@
#include "mongo/db/s/operation_sharding_state.h"
#include "mongo/db/service_context.h"
#include "mongo/db/service_context_test_fixture.h"
-#include "mongo/db/transaction_api.h"
+#include "mongo/db/transaction/transaction_api.h"
#include "mongo/executor/network_interface_factory.h"
#include "mongo/executor/thread_pool_task_executor.h"
#include "mongo/rpc/get_status_from_command_result.h"
diff --git a/src/mongo/db/transaction_history_iterator.cpp b/src/mongo/db/transaction/transaction_history_iterator.cpp
index 90410064085..d9be44df320 100644
--- a/src/mongo/db/transaction_history_iterator.cpp
+++ b/src/mongo/db/transaction/transaction_history_iterator.cpp
@@ -36,7 +36,7 @@
#include "mongo/db/operation_context.h"
#include "mongo/db/query/get_executor.h"
#include "mongo/db/repl/oplog_entry.h"
-#include "mongo/db/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
#include "mongo/logv2/redaction.h"
#include "mongo/util/str.h"
diff --git a/src/mongo/db/transaction_history_iterator.h b/src/mongo/db/transaction/transaction_history_iterator.h
index e81131131cc..e81131131cc 100644
--- a/src/mongo/db/transaction_history_iterator.h
+++ b/src/mongo/db/transaction/transaction_history_iterator.h
diff --git a/src/mongo/db/transaction_history_iterator_test.cpp b/src/mongo/db/transaction/transaction_history_iterator_test.cpp
index 836df9d29c4..f59a276f9b6 100644
--- a/src/mongo/db/transaction_history_iterator_test.cpp
+++ b/src/mongo/db/transaction/transaction_history_iterator_test.cpp
@@ -45,7 +45,7 @@
#include "mongo/db/repl/replication_coordinator_mock.h"
#include "mongo/db/service_context.h"
#include "mongo/db/service_context_d_test_fixture.h"
-#include "mongo/db/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
#include "mongo/unittest/unittest.h"
namespace mongo {
diff --git a/src/mongo/db/transaction_metrics_observer.cpp b/src/mongo/db/transaction/transaction_metrics_observer.cpp
index fa683bce8de..0a503e3b135 100644
--- a/src/mongo/db/transaction_metrics_observer.cpp
+++ b/src/mongo/db/transaction/transaction_metrics_observer.cpp
@@ -29,10 +29,10 @@
#include "mongo/platform/basic.h"
-#include "mongo/db/transaction_metrics_observer.h"
+#include "mongo/db/transaction/transaction_metrics_observer.h"
-#include "mongo/db/server_transactions_metrics.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/server_transactions_metrics.h"
+#include "mongo/db/transaction/transaction_participant.h"
namespace mongo {
diff --git a/src/mongo/db/transaction_metrics_observer.h b/src/mongo/db/transaction/transaction_metrics_observer.h
index 510d3dc3faa..833c4e5cfb7 100644
--- a/src/mongo/db/transaction_metrics_observer.h
+++ b/src/mongo/db/transaction/transaction_metrics_observer.h
@@ -30,9 +30,9 @@
#pragma once
#include "mongo/db/curop.h"
-#include "mongo/db/server_transactions_metrics.h"
#include "mongo/db/stats/single_transaction_stats.h"
#include "mongo/db/stats/top.h"
+#include "mongo/db/transaction/server_transactions_metrics.h"
namespace mongo {
diff --git a/src/mongo/db/transaction_participant.cpp b/src/mongo/db/transaction/transaction_participant.cpp
index 45de7032391..221c9dfef35 100644
--- a/src/mongo/db/transaction_participant.cpp
+++ b/src/mongo/db/transaction/transaction_participant.cpp
@@ -33,7 +33,7 @@
#include "mongo/platform/basic.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include <fmt/format.h>
@@ -61,15 +61,15 @@
#include "mongo/db/repl/apply_ops_command_info.h"
#include "mongo/db/repl/repl_client_info.h"
#include "mongo/db/repl/storage_interface.h"
-#include "mongo/db/retryable_writes_stats.h"
#include "mongo/db/s/sharding_write_router.h"
#include "mongo/db/server_recovery.h"
-#include "mongo/db/server_transactions_metrics.h"
#include "mongo/db/session_catalog_mongod.h"
#include "mongo/db/stats/fill_locker_info.h"
#include "mongo/db/storage/flow_control.h"
-#include "mongo/db/transaction_history_iterator.h"
-#include "mongo/db/transaction_participant_gen.h"
+#include "mongo/db/transaction/retryable_writes_stats.h"
+#include "mongo/db/transaction/server_transactions_metrics.h"
+#include "mongo/db/transaction/transaction_history_iterator.h"
+#include "mongo/db/transaction/transaction_participant_gen.h"
#include "mongo/db/txn_retry_counter_too_old_info.h"
#include "mongo/db/vector_clock_mutable.h"
#include "mongo/logv2/log.h"
diff --git a/src/mongo/db/transaction_participant.h b/src/mongo/db/transaction/transaction_participant.h
index e584960b1c8..79ecabef527 100644
--- a/src/mongo/db/transaction_participant.h
+++ b/src/mongo/db/transaction/transaction_participant.h
@@ -47,11 +47,11 @@
#include "mongo/db/repl/read_concern_args.h"
#include "mongo/db/session.h"
#include "mongo/db/session_catalog.h"
-#include "mongo/db/session_txn_record_gen.h"
#include "mongo/db/stats/single_transaction_stats.h"
#include "mongo/db/storage/recovery_unit.h"
#include "mongo/db/storage/storage_engine.h"
-#include "mongo/db/transaction_metrics_observer.h"
+#include "mongo/db/transaction/session_txn_record_gen.h"
+#include "mongo/db/transaction/transaction_metrics_observer.h"
#include "mongo/idl/mutable_observer_registry.h"
#include "mongo/logv2/attribute_storage.h"
#include "mongo/stdx/unordered_map.h"
diff --git a/src/mongo/db/transaction_participant.idl b/src/mongo/db/transaction/transaction_participant.idl
index 95b68973ca6..79f54605312 100644
--- a/src/mongo/db/transaction_participant.idl
+++ b/src/mongo/db/transaction/transaction_participant.idl
@@ -29,7 +29,7 @@
global:
cpp_namespace: "mongo"
cpp_includes:
- - "mongo/db/transaction_participant.h"
+ - "mongo/db/transaction/transaction_participant.h"
server_parameters:
maxTransactionLockRequestTimeoutMillis:
diff --git a/src/mongo/db/transaction_participant_resource_yielder.cpp b/src/mongo/db/transaction/transaction_participant_resource_yielder.cpp
index c84100e155e..5143ee239fd 100644
--- a/src/mongo/db/transaction_participant_resource_yielder.cpp
+++ b/src/mongo/db/transaction/transaction_participant_resource_yielder.cpp
@@ -27,11 +27,11 @@
* it in the license file.
*/
-#include "mongo/db/transaction_participant_resource_yielder.h"
+#include "mongo/db/transaction/transaction_participant_resource_yielder.h"
#include "mongo/db/session_catalog.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
namespace mongo {
diff --git a/src/mongo/db/transaction_participant_resource_yielder.h b/src/mongo/db/transaction/transaction_participant_resource_yielder.h
index 346463db481..346463db481 100644
--- a/src/mongo/db/transaction_participant_resource_yielder.h
+++ b/src/mongo/db/transaction/transaction_participant_resource_yielder.h
diff --git a/src/mongo/db/transaction_participant_retryable_writes_test.cpp b/src/mongo/db/transaction/transaction_participant_retryable_writes_test.cpp
index 708eb7df4db..0b5c86ecbc9 100644
--- a/src/mongo/db/transaction_participant_retryable_writes_test.cpp
+++ b/src/mongo/db/transaction/transaction_participant_retryable_writes_test.cpp
@@ -43,10 +43,10 @@
#include "mongo/db/repl/optime.h"
#include "mongo/db/repl/storage_interface_impl.h"
#include "mongo/db/server_options.h"
-#include "mongo/db/server_transactions_metrics.h"
#include "mongo/db/service_context.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/server_transactions_metrics.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/idl/server_parameter_test_util.h"
#include "mongo/stdx/future.h"
#include "mongo/unittest/death_test.h"
diff --git a/src/mongo/db/transaction_participant_test.cpp b/src/mongo/db/transaction/transaction_participant_test.cpp
index 426748152b4..9e2642e20e2 100644
--- a/src/mongo/db/transaction_participant_test.cpp
+++ b/src/mongo/db/transaction/transaction_participant_test.cpp
@@ -44,13 +44,13 @@
#include "mongo/db/repl/optime.h"
#include "mongo/db/repl/storage_interface_impl.h"
#include "mongo/db/repl/storage_interface_mock.h"
-#include "mongo/db/server_transactions_metrics.h"
#include "mongo/db/service_context.h"
#include "mongo/db/session_catalog.h"
#include "mongo/db/session_catalog_mongod.h"
#include "mongo/db/stats/fill_locker_info.h"
-#include "mongo/db/transaction_participant.h"
-#include "mongo/db/transaction_participant_gen.h"
+#include "mongo/db/transaction/server_transactions_metrics.h"
+#include "mongo/db/transaction/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant_gen.h"
#include "mongo/db/txn_retry_counter_too_old_info.h"
#include "mongo/idl/server_parameter_test_util.h"
#include "mongo/stdx/future.h"
diff --git a/src/mongo/db/transactions_stats.idl b/src/mongo/db/transaction/transactions_stats.idl
index eb55df77a74..eb55df77a74 100644
--- a/src/mongo/db/transactions_stats.idl
+++ b/src/mongo/db/transaction/transactions_stats.idl
diff --git a/src/mongo/dbtests/SConscript b/src/mongo/dbtests/SConscript
index d4d8dd6ef94..eabf9fb48ea 100644
--- a/src/mongo/dbtests/SConscript
+++ b/src/mongo/dbtests/SConscript
@@ -175,7 +175,7 @@ env.Program(
"$BUILD_DIR/mongo/db/storage/durable_catalog_impl",
"$BUILD_DIR/mongo/db/storage/storage_engine_impl",
"$BUILD_DIR/mongo/db/traffic_reader",
- "$BUILD_DIR/mongo/db/transaction",
+ "$BUILD_DIR/mongo/db/transaction/transaction",
"$BUILD_DIR/mongo/db/vector_clock",
"$BUILD_DIR/mongo/shell/shell_utils",
"$BUILD_DIR/mongo/transport/message_compressor_options_server",
diff --git a/src/mongo/s/commands/SConscript b/src/mongo/s/commands/SConscript
index d634882459a..ebd0074f4d4 100644
--- a/src/mongo/s/commands/SConscript
+++ b/src/mongo/s/commands/SConscript
@@ -143,7 +143,7 @@ env.Library(
'$BUILD_DIR/mongo/db/stats/counters',
'$BUILD_DIR/mongo/db/timeseries/timeseries_conversion_util',
'$BUILD_DIR/mongo/db/timeseries/timeseries_options',
- '$BUILD_DIR/mongo/db/transaction_api',
+ '$BUILD_DIR/mongo/db/transaction/transaction_api',
'$BUILD_DIR/mongo/db/views/views',
'$BUILD_DIR/mongo/executor/async_multicaster',
'$BUILD_DIR/mongo/executor/async_request_executor',
@@ -181,7 +181,7 @@ env.Library(
'$BUILD_DIR/mongo/db/shared_request_handling',
'$BUILD_DIR/mongo/db/stats/api_version_metrics',
'$BUILD_DIR/mongo/db/stats/counters',
- '$BUILD_DIR/mongo/db/transaction_api',
+ '$BUILD_DIR/mongo/db/transaction/transaction_api',
'$BUILD_DIR/mongo/rpc/rewrite_state_change_errors',
'$BUILD_DIR/mongo/s/load_balancer_support',
'$BUILD_DIR/mongo/s/mongos_topology_coordinator',
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 9d509016a82..bcd2d5a746f 100644
--- a/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp
+++ b/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp
@@ -44,7 +44,7 @@
#include "mongo/db/ops/write_ops_gen.h"
#include "mongo/db/query/collation/collator_factory_interface.h"
#include "mongo/db/storage/duplicate_key_error_info.h"
-#include "mongo/db/transaction_api.h"
+#include "mongo/db/transaction/transaction_api.h"
#include "mongo/executor/task_executor_pool.h"
#include "mongo/logv2/log.h"
#include "mongo/rpc/get_status_from_command_result.h"
diff --git a/src/mongo/s/commands/document_shard_key_update_util.h b/src/mongo/s/commands/document_shard_key_update_util.h
index 5b3a8bc6225..a1b930a38cf 100644
--- a/src/mongo/s/commands/document_shard_key_update_util.h
+++ b/src/mongo/s/commands/document_shard_key_update_util.h
@@ -35,7 +35,7 @@
#include "mongo/db/logical_session_id.h"
#include "mongo/db/ops/write_ops.h"
-#include "mongo/db/transaction_api.h"
+#include "mongo/db/transaction/transaction_api.h"
#include "mongo/executor/task_executor_pool.h"
#include "mongo/s/transaction_router.h"
diff --git a/src/mongo/s/commands/internal_transactions_test_command.h b/src/mongo/s/commands/internal_transactions_test_command.h
index a605722c7f5..45d966a1846 100644
--- a/src/mongo/s/commands/internal_transactions_test_command.h
+++ b/src/mongo/s/commands/internal_transactions_test_command.h
@@ -31,7 +31,7 @@
#include "mongo/db/commands.h"
#include "mongo/db/commands/internal_transactions_test_command_gen.h"
#include "mongo/db/query/find_command_gen.h"
-#include "mongo/db/transaction_api.h"
+#include "mongo/db/transaction/transaction_api.h"
#include "mongo/executor/network_interface_factory.h"
#include "mongo/executor/thread_pool_task_executor.h"
#include "mongo/s/grid.h"
diff --git a/src/mongo/s/query/blocking_results_merger.cpp b/src/mongo/s/query/blocking_results_merger.cpp
index c1a957a311f..6c6d622a041 100644
--- a/src/mongo/s/query/blocking_results_merger.cpp
+++ b/src/mongo/s/query/blocking_results_merger.cpp
@@ -31,7 +31,7 @@
#include "mongo/db/query/find_common.h"
#include "mongo/db/session_catalog_mongod.h"
-#include "mongo/db/transaction_participant.h"
+#include "mongo/db/transaction/transaction_participant.h"
#include "mongo/s/query/blocking_results_merger.h"
#include "mongo/util/scopeguard.h"