diff options
250 files changed, 664 insertions, 659 deletions
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript index ccd8ef57ea8..fd9258dd951 100644 --- a/src/mongo/db/SConscript +++ b/src/mongo/db/SConscript @@ -40,6 +40,7 @@ env.SConscript( 'repl', 's', 'serverless', + 'session', 'sorter', 'stats', 'storage', @@ -538,12 +539,12 @@ env.Library( '$BUILD_DIR/mongo/db/change_stream_pre_images_collection_manager', '$BUILD_DIR/mongo/db/change_stream_state', '$BUILD_DIR/mongo/db/dbdirectclient', - '$BUILD_DIR/mongo/db/logical_session_id', - '$BUILD_DIR/mongo/db/logical_session_id_helpers', '$BUILD_DIR/mongo/db/repl/primary_only_service', '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', '$BUILD_DIR/mongo/db/repl/wait_for_majority_service', '$BUILD_DIR/mongo/db/rw_concern_d', + '$BUILD_DIR/mongo/db/session/logical_session_id', + '$BUILD_DIR/mongo/db/session/logical_session_id_helpers', '$BUILD_DIR/mongo/idl/idl_parser', ], ) @@ -628,8 +629,8 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/logical_session_id', '$BUILD_DIR/mongo/db/multi_key_path_tracker', + '$BUILD_DIR/mongo/db/session/logical_session_id', '$BUILD_DIR/mongo/db/storage/recovery_unit_base', '$BUILD_DIR/mongo/db/storage/write_unit_of_work', '$BUILD_DIR/mongo/util/clock_sources', @@ -858,22 +859,6 @@ env.Library( ) env.Library( - target='session_catalog', - source=[ - 'session_catalog.cpp', - ], - LIBDEPS=[ - 'kill_sessions', - 'logical_session_id', - 'logical_session_id_helpers', - ], - LIBDEPS_PRIVATE=[ - 'internal_transactions_feature_flag', - 'service_context', - ], -) - -env.Library( target='catalog_raii', source=[ 'catalog/catalog_helper.cpp', @@ -912,11 +897,11 @@ env.Library( '$BUILD_DIR/mongo/db/matcher/expressions', '$BUILD_DIR/mongo/db/query/collation/collator_factory_interface', '$BUILD_DIR/mongo/db/query/query_request', + '$BUILD_DIR/mongo/db/session/logical_session_id', '$BUILD_DIR/mongo/executor/task_executor_pool', '$BUILD_DIR/mongo/s/grid', '$BUILD_DIR/mongo/s/sharding_router_api', 'dbdirectclient', - 'logical_session_id', ], ) @@ -929,14 +914,14 @@ 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/session/logical_session_id', + '$BUILD_DIR/mongo/db/session/session_catalog', '$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', "$BUILD_DIR/mongo/util/concurrency/thread_pool", 'fle_crud', - 'logical_session_id', - 'session_catalog', ], ) @@ -959,12 +944,12 @@ env.Library( 'cluster_transaction_api.cpp', ], LIBDEPS_PRIVATE=[ + '$BUILD_DIR/mongo/db/session/logical_session_id', + '$BUILD_DIR/mongo/db/session/logical_session_id_helpers', '$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', - 'logical_session_id', - 'logical_session_id_helpers', 'service_context', 'shared_request_handling', ], @@ -1497,7 +1482,6 @@ env.Library( 'fts/base_fts', 'index/index_descriptor', 'index/key_generator', - 'logical_session_cache', 'matcher/expressions_mongod_only', 'ops/parsed_update', 'pipeline/pipeline', @@ -1508,6 +1492,7 @@ env.Library( 'query/sbe_stage_builder_helpers', 'repl/repl_coordinator_interface', 's/sharding_api_d', + 'session/logical_session_cache', 'shared_request_handling', 'stats/serveronly_stats', 'storage/remove_saver', @@ -1521,10 +1506,10 @@ env.Library( '$BUILD_DIR/mongo/db/commands/server_status_core', '$BUILD_DIR/mongo/db/concurrency/exception_util', '$BUILD_DIR/mongo/db/internal_transactions_feature_flag', + '$BUILD_DIR/mongo/db/session/kill_sessions', '$BUILD_DIR/mongo/db/stats/resource_consumption_metrics', '$BUILD_DIR/mongo/db/storage/record_store_base', '$BUILD_DIR/mongo/db/timeseries/timeseries_options', - 'kill_sessions', 'not_primary_error_tracker', 'record_id_helpers', ], @@ -1556,35 +1541,6 @@ env.Library( ) env.Library( - target='logical_session_id', - source=[ - 'logical_session_id.cpp', - 'logical_session_id.idl', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/crypto/sha256_block', - '$BUILD_DIR/mongo/crypto/sha_block_${MONGO_CRYPTO}', - '$BUILD_DIR/mongo/idl/idl_parser', - '$BUILD_DIR/mongo/idl/server_parameter', - ], -) - -env.Library( - target='logical_session_id_helpers', - source=[ - 'internal_session_pool.cpp', - 'logical_session_id_helpers.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/db/auth/auth', - '$BUILD_DIR/mongo/db/auth/authprivilege', - 'logical_session_cache', - 'logical_session_id', - ], -) - -env.Library( target='service_liaison', source=[ 'service_liaison.cpp', @@ -1605,8 +1561,8 @@ envWithAsio.Library( 'service_liaison_mock.cpp', ], LIBDEPS=[ + '$BUILD_DIR/mongo/db/session/kill_sessions', '$BUILD_DIR/mongo/util/periodic_runner_factory', - 'kill_sessions', 'service_liaison', ], LIBDEPS_PRIVATE=[ @@ -1620,7 +1576,7 @@ envWithAsio.Library( 'service_liaison_mongod.cpp', ], LIBDEPS=[ - '$BUILD_DIR/mongo/db/logical_session_id', + '$BUILD_DIR/mongo/db/session/logical_session_id', '$BUILD_DIR/mongo/util/clock_sources', '$BUILD_DIR/mongo/util/periodic_runner', 'query_exec', @@ -1635,7 +1591,7 @@ env.Library( 'service_liaison_mongos.cpp', ], LIBDEPS=[ - '$BUILD_DIR/mongo/db/logical_session_id', + '$BUILD_DIR/mongo/db/session/logical_session_id', '$BUILD_DIR/mongo/s/coreshard', '$BUILD_DIR/mongo/s/query/cluster_cursor_manager', '$BUILD_DIR/mongo/util/clock_sources', @@ -1659,109 +1615,15 @@ env.Library( ) env.Library( - target='sessions_collection', - source=[ - 'sessions_collection.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/client/clientdriver_minimal', - '$BUILD_DIR/mongo/s/write_ops/batch_write_types', - 'logical_session_id', - 'logical_session_id_helpers', - ], - LIBDEPS_PRIVATE=[ - 'index_commands_idl', - ], -) - -env.Library( - target='sessions_collection_mock', - source=[ - 'sessions_collection_mock.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/logical_session_id', - 'sessions_collection', - ], -) - -env.Library( - target='sessions_collection_rs', - source=[ - 'sessions_collection_rs.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/client/authentication', - '$BUILD_DIR/mongo/client/remote_command_targeter', - '$BUILD_DIR/mongo/db/concurrency/lock_manager', - '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', - 'dbdirectclient', - 'sessions_collection', - ], -) - -env.Library( - target='sessions_collection_standalone', - source=[ - 'sessions_collection_standalone.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/base', - 'dbdirectclient', - 'logical_session_id', - 'sessions_collection', - ], -) - -env.Library( - target='logical_session_cache', - source=[ - 'logical_session_cache.cpp', - 'logical_session_cache_stats.idl', - 'logical_session_cache.idl', - ], - LIBDEPS=[ - 'logical_session_id', - 'service_context', - ], - LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/idl/server_parameter', - ], -) - -env.Library( - target='logical_session_cache_impl', - source=[ - 'initialize_operation_session_info.cpp', - 'logical_session_cache_impl.cpp', - ], - LIBDEPS=[ - 'kill_sessions', - 'logical_session_cache', - 'logical_session_id', - 'logical_session_id_helpers', - 'service_liaison', - 'sessions_collection', - ], - LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/db/s/sharding_api_d', - 'internal_transactions_feature_flag', - ], -) - -env.Library( target='error_labels', source=[ 'error_labels.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/pipeline/lite_parsed_document_source', + '$BUILD_DIR/mongo/db/session/logical_session_id', 'commands', 'curop', - 'logical_session_id', ], ) @@ -1771,9 +1633,9 @@ env.Library( 'transaction_validation.cpp', ], LIBDEPS=[ + '$BUILD_DIR/mongo/db/session/logical_session_cache_impl', 'api_parameters', 'error_labels', - 'logical_session_cache_impl', ], ) @@ -1825,42 +1687,6 @@ env.Library( ) env.Library( - target='kill_sessions', - source=[ - 'kill_sessions.cpp', - 'kill_sessions_common.cpp', - 'session_killer.cpp', - 'kill_sessions.idl', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/base', - ], - LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/db/auth/auth', - '$BUILD_DIR/mongo/db/auth/authprivilege', - '$BUILD_DIR/mongo/idl/idl_parser', - '$BUILD_DIR/mongo/rpc/client_metadata', - 'api_parameters', - 'logical_session_id_helpers', - ], -) - -env.Library( - target='kill_sessions_local', - source=[ - 'kill_sessions_local.cpp', - ], - LIBDEPS=[ - 'kill_sessions', - 'query_exec', - ], - LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/db/transaction/transaction', - 'session_catalog', - ], -) - -env.Library( target='operation_killer', source=[ 'operation_killer.cpp', @@ -1881,9 +1707,9 @@ env.Library( 'periodic_runner_job_abort_expired_transactions.cpp', ], LIBDEPS_PRIVATE=[ + '$BUILD_DIR/mongo/db/session/kill_sessions_local', '$BUILD_DIR/mongo/db/transaction/transaction', '$BUILD_DIR/mongo/util/periodic_runner', - 'kill_sessions_local', ], ) @@ -2327,8 +2153,6 @@ env.Library( 'index_builds_coordinator_mongod', 'introspect', 'keys_collection_client_direct', - 'kill_sessions_local', - 'logical_session_cache_impl', 'logical_time_metadata_hook', 'matcher/expressions_mongod_only', 'mirror_maestro', @@ -2355,8 +2179,10 @@ env.Library( 'rw_concern_d', 'serverless/shard_split_commands', 'service_liaison_mongod', - 'sessions_collection_rs', - 'sessions_collection_standalone', + 'session/kill_sessions_local', + 'session/logical_session_cache_impl', + 'session/sessions_collection_rs', + 'session/sessions_collection_standalone', 'startup_warnings_mongod', 'stats/counters', 'stats/serveronly_stats', @@ -2437,8 +2263,6 @@ env.Library( 'index/index_access_methods', 'index_builds_coordinator_mongod', 'keys_collection_client_direct', - 'kill_sessions', - 'kill_sessions_local', 'log_process_details', 'mirror_maestro', 'mongod_initializers', @@ -2467,8 +2291,10 @@ env.Library( 'serverless/shard_split_donor_service', 'service_context_d', 'service_liaison_mongod', - 'sessions_collection_rs', - 'sessions_collection_standalone', + 'session/kill_sessions', + 'session/kill_sessions_local', + 'session/sessions_collection_rs', + 'session/sessions_collection_standalone', 'startup_recovery', 'startup_warnings_mongod', 'storage/backup_cursor_hooks', @@ -2598,11 +2424,8 @@ if wiredtiger: 'index_build_entry_helpers_test.cpp', 'index_builds_coordinator_mongod_test.cpp', 'index_builds_coordinator_test.cpp', - 'internal_session_pool_test.cpp', 'keypattern_test.cpp', 'keys_collection_document_test.cpp', - 'logical_session_cache_test.cpp', - 'logical_session_id_test.cpp', 'logical_time_test.cpp', 'mirroring_sampler_test.cpp', 'multi_key_path_tracker_test.cpp', @@ -2621,8 +2444,11 @@ if wiredtiger: 'read_write_concern_provenance_test.cpp', 'record_id_test.cpp', 'server_options_test.cpp', - 'session_catalog_mongod_test.cpp', - 'session_catalog_test.cpp', + 'session/internal_session_pool_test.cpp', + 'session/logical_session_cache_test.cpp', + 'session/logical_session_id_test.cpp', + 'session/session_catalog_mongod_test.cpp', + 'session/session_catalog_test.cpp', 'startup_warnings_mongod_test.cpp', 'thread_client_test.cpp', 'time_proof_service_test.cpp', @@ -2677,6 +2503,13 @@ if wiredtiger: '$BUILD_DIR/mongo/db/repl/tenant_migration_access_blocker', '$BUILD_DIR/mongo/db/s/shard_server_test_fixture', '$BUILD_DIR/mongo/db/s/sharding_api_d', + '$BUILD_DIR/mongo/db/session/logical_session_cache', + '$BUILD_DIR/mongo/db/session/logical_session_cache_impl', + '$BUILD_DIR/mongo/db/session/logical_session_id', + '$BUILD_DIR/mongo/db/session/logical_session_id_helpers', + '$BUILD_DIR/mongo/db/session/session_catalog', + '$BUILD_DIR/mongo/db/session/sessions_collection', + '$BUILD_DIR/mongo/db/session/sessions_collection_mock', '$BUILD_DIR/mongo/db/stats/fill_locker_info', '$BUILD_DIR/mongo/db/stats/transaction_stats', '$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger', @@ -2705,10 +2538,6 @@ if wiredtiger: 'index_builds_coordinator_mongod', 'keys_collection_client_direct', 'keys_collection_document', - 'logical_session_cache', - 'logical_session_cache_impl', - 'logical_session_id', - 'logical_session_id_helpers', 'logical_time', 'mirror_maestro', 'multitenancy', @@ -2728,9 +2557,6 @@ if wiredtiger: 'service_context_devnull_test_fixture', 'service_context_test_fixture', 'service_liaison_mock', - 'session_catalog', - 'sessions_collection', - 'sessions_collection_mock', 'signed_logical_time', 'snapshot_window_options', 'startup_warnings_mongod', diff --git a/src/mongo/db/auth/auth_op_observer_test.cpp b/src/mongo/db/auth/auth_op_observer_test.cpp index ebf2e366477..831d9b6fb05 100644 --- a/src/mongo/db/auth/auth_op_observer_test.cpp +++ b/src/mongo/db/auth/auth_op_observer_test.cpp @@ -44,7 +44,7 @@ #include "mongo/db/repl/replication_coordinator_mock.h" #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/session/session_catalog_mongod.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/collection.h b/src/mongo/db/catalog/collection.h index 9d27e481fab..097b115864f 100644 --- a/src/mongo/db/catalog/collection.h +++ b/src/mongo/db/catalog/collection.h @@ -41,12 +41,12 @@ #include "mongo/db/catalog/collection_operation_source.h" #include "mongo/db/catalog/collection_options.h" #include "mongo/db/concurrency/d_concurrency.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/namespace_string.h" #include "mongo/db/query/collation/collator_interface.h" #include "mongo/db/query/plan_executor.h" #include "mongo/db/record_id.h" #include "mongo/db/repl/oplog.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/db/storage/bson_collection_catalog_entry.h" #include "mongo/db/storage/record_store.h" #include "mongo/db/storage/snapshot.h" diff --git a/src/mongo/db/clientcursor.h b/src/mongo/db/clientcursor.h index 70b5143fe8e..121566cbdb8 100644 --- a/src/mongo/db/clientcursor.h +++ b/src/mongo/db/clientcursor.h @@ -38,10 +38,10 @@ #include "mongo/db/auth/user_name.h" #include "mongo/db/cursor_id.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/query/plan_executor.h" #include "mongo/db/record_id.h" #include "mongo/db/repl/read_concern_level.h" +#include "mongo/db/session/logical_session_id.h" namespace mongo { diff --git a/src/mongo/db/commands/SConscript b/src/mongo/db/commands/SConscript index 072c913dd2f..f991bdbb73b 100644 --- a/src/mongo/db/commands/SConscript +++ b/src/mongo/db/commands/SConscript @@ -112,15 +112,15 @@ env.Library( '$BUILD_DIR/mongo/db/commands', '$BUILD_DIR/mongo/db/common', '$BUILD_DIR/mongo/db/fle_crud', - '$BUILD_DIR/mongo/db/kill_sessions', - '$BUILD_DIR/mongo/db/logical_session_cache', - '$BUILD_DIR/mongo/db/logical_session_cache_impl', - '$BUILD_DIR/mongo/db/logical_session_id', - '$BUILD_DIR/mongo/db/logical_session_id_helpers', '$BUILD_DIR/mongo/db/mongohasher', '$BUILD_DIR/mongo/db/namespace_string', '$BUILD_DIR/mongo/db/ops/write_ops_parsers', '$BUILD_DIR/mongo/db/server_options_core', + '$BUILD_DIR/mongo/db/session/kill_sessions', + '$BUILD_DIR/mongo/db/session/logical_session_cache', + '$BUILD_DIR/mongo/db/session/logical_session_cache_impl', + '$BUILD_DIR/mongo/db/session/logical_session_id', + '$BUILD_DIR/mongo/db/session/logical_session_id_helpers', '$BUILD_DIR/mongo/idl/basic_types', '$BUILD_DIR/mongo/idl/idl_parser', '$BUILD_DIR/mongo/idl/server_parameter', @@ -164,10 +164,6 @@ env.Library( '$BUILD_DIR/mongo/db/commands', '$BUILD_DIR/mongo/db/common', '$BUILD_DIR/mongo/db/log_process_details', - '$BUILD_DIR/mongo/db/logical_session_cache', - '$BUILD_DIR/mongo/db/logical_session_cache_impl', - '$BUILD_DIR/mongo/db/logical_session_id', - '$BUILD_DIR/mongo/db/logical_session_id_helpers', '$BUILD_DIR/mongo/db/multitenancy', '$BUILD_DIR/mongo/db/multitenancy_params', '$BUILD_DIR/mongo/db/pipeline/change_stream_pipeline', @@ -175,7 +171,11 @@ env.Library( '$BUILD_DIR/mongo/db/pipeline/pipeline', '$BUILD_DIR/mongo/db/repl/isself', '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', - '$BUILD_DIR/mongo/db/session_catalog', + '$BUILD_DIR/mongo/db/session/logical_session_cache', + '$BUILD_DIR/mongo/db/session/logical_session_cache_impl', + '$BUILD_DIR/mongo/db/session/logical_session_id', + '$BUILD_DIR/mongo/db/session/logical_session_id_helpers', + '$BUILD_DIR/mongo/db/session/session_catalog', '$BUILD_DIR/mongo/db/shared_request_handling', '$BUILD_DIR/mongo/db/traffic_recorder', '$BUILD_DIR/mongo/executor/egress_tag_closer_manager', diff --git a/src/mongo/db/commands/command_mirroring_test.cpp b/src/mongo/db/commands/command_mirroring_test.cpp index 377234fc9a6..99db08a6df5 100644 --- a/src/mongo/db/commands/command_mirroring_test.cpp +++ b/src/mongo/db/commands/command_mirroring_test.cpp @@ -32,9 +32,9 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/db/client.h" #include "mongo/db/commands.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/operation_context.h" #include "mongo/db/service_context.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/unittest/unittest.h" namespace mongo { diff --git a/src/mongo/db/commands/create_indexes.cpp b/src/mongo/db/commands/create_indexes.cpp index 4cf9bc4880b..d9e0b99a7ea 100644 --- a/src/mongo/db/commands/create_indexes.cpp +++ b/src/mongo/db/commands/create_indexes.cpp @@ -63,7 +63,7 @@ #include "mongo/db/s/database_sharding_state.h" #include "mongo/db/s/operation_sharding_state.h" #include "mongo/db/s/sharding_state.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/storage/two_phase_index_build_knobs_gen.h" #include "mongo/db/timeseries/catalog_helper.h" #include "mongo/db/timeseries/timeseries_commands_conversion_helper.h" diff --git a/src/mongo/db/commands/end_sessions_command.cpp b/src/mongo/db/commands/end_sessions_command.cpp index 3d11bc0d03e..040a2dc36f1 100644 --- a/src/mongo/db/commands/end_sessions_command.cpp +++ b/src/mongo/db/commands/end_sessions_command.cpp @@ -34,9 +34,9 @@ #include "mongo/db/client.h" #include "mongo/db/commands.h" #include "mongo/db/commands/sessions_commands_gen.h" -#include "mongo/db/logical_session_cache.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/logical_session_id_helpers.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp b/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp index de3fedd0e8a..e190bf507a4 100644 --- a/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp +++ b/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp @@ -38,13 +38,13 @@ #include "mongo/db/client.h" #include "mongo/db/commands.h" #include "mongo/db/jsobj.h" -#include "mongo/db/kill_sessions.h" -#include "mongo/db/kill_sessions_common.h" -#include "mongo/db/kill_sessions_local.h" -#include "mongo/db/logical_session_cache.h" -#include "mongo/db/logical_session_id.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/kill_sessions.h" +#include "mongo/db/session/kill_sessions_common.h" +#include "mongo/db/session/kill_sessions_local.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/db/stats/top.h" namespace mongo { diff --git a/src/mongo/db/commands/kill_all_sessions_command.cpp b/src/mongo/db/commands/kill_all_sessions_command.cpp index 73717c15c2f..2c51bb3b0ae 100644 --- a/src/mongo/db/commands/kill_all_sessions_command.cpp +++ b/src/mongo/db/commands/kill_all_sessions_command.cpp @@ -38,13 +38,13 @@ #include "mongo/db/client.h" #include "mongo/db/commands.h" #include "mongo/db/jsobj.h" -#include "mongo/db/kill_sessions.h" -#include "mongo/db/kill_sessions_common.h" -#include "mongo/db/kill_sessions_local.h" -#include "mongo/db/logical_session_cache.h" -#include "mongo/db/logical_session_id.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/kill_sessions.h" +#include "mongo/db/session/kill_sessions_common.h" +#include "mongo/db/session/kill_sessions_local.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/db/stats/top.h" namespace mongo { diff --git a/src/mongo/db/commands/kill_sessions_command.cpp b/src/mongo/db/commands/kill_sessions_command.cpp index 2e237c4e7f6..50cd1a6d5f5 100644 --- a/src/mongo/db/commands/kill_sessions_command.cpp +++ b/src/mongo/db/commands/kill_sessions_command.cpp @@ -38,13 +38,13 @@ #include "mongo/db/client.h" #include "mongo/db/commands.h" #include "mongo/db/jsobj.h" -#include "mongo/db/kill_sessions.h" -#include "mongo/db/kill_sessions_common.h" -#include "mongo/db/kill_sessions_local.h" -#include "mongo/db/logical_session_cache.h" -#include "mongo/db/logical_session_id.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/kill_sessions.h" +#include "mongo/db/session/kill_sessions_common.h" +#include "mongo/db/session/kill_sessions_local.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/db/stats/top.h" namespace mongo { diff --git a/src/mongo/db/commands/logical_session_server_status_section.cpp b/src/mongo/db/commands/logical_session_server_status_section.cpp index d39c8332e6b..95d7a58895e 100644 --- a/src/mongo/db/commands/logical_session_server_status_section.cpp +++ b/src/mongo/db/commands/logical_session_server_status_section.cpp @@ -31,9 +31,9 @@ #include "mongo/db/commands/server_status.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_cache.h" #include "mongo/db/operation_context.h" -#include "mongo/db/session_catalog.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/session_catalog.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands/reap_logical_session_cache_now.cpp b/src/mongo/db/commands/reap_logical_session_cache_now.cpp index a53aef63fdd..ab4c6f10e72 100644 --- a/src/mongo/db/commands/reap_logical_session_cache_now.cpp +++ b/src/mongo/db/commands/reap_logical_session_cache_now.cpp @@ -32,8 +32,8 @@ #include "mongo/base/init.h" #include "mongo/db/commands.h" #include "mongo/db/commands/test_commands_enabled.h" -#include "mongo/db/logical_session_cache.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/logical_session_cache.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands/refresh_logical_session_cache_now.cpp b/src/mongo/db/commands/refresh_logical_session_cache_now.cpp index a22ca5e4897..5dafebcce89 100644 --- a/src/mongo/db/commands/refresh_logical_session_cache_now.cpp +++ b/src/mongo/db/commands/refresh_logical_session_cache_now.cpp @@ -32,8 +32,8 @@ #include "mongo/base/init.h" #include "mongo/db/commands.h" #include "mongo/db/commands/test_commands_enabled.h" -#include "mongo/db/logical_session_cache.h" -#include "mongo/db/logical_session_id_helpers.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/logical_session_id_helpers.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands/refresh_sessions_command.cpp b/src/mongo/db/commands/refresh_sessions_command.cpp index 209fef853c3..6ea2b09d36c 100644 --- a/src/mongo/db/commands/refresh_sessions_command.cpp +++ b/src/mongo/db/commands/refresh_sessions_command.cpp @@ -34,9 +34,9 @@ #include "mongo/db/commands.h" #include "mongo/db/commands/sessions_commands_gen.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_cache.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/logical_session_id_helpers.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands/sessions_commands.idl b/src/mongo/db/commands/sessions_commands.idl index d9528ad6908..ad7e75f0c5a 100644 --- a/src/mongo/db/commands/sessions_commands.idl +++ b/src/mongo/db/commands/sessions_commands.idl @@ -31,7 +31,7 @@ global: imports: - "mongo/db/auth/access_checks.idl" - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/idl/basic_types.idl" commands: 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 d8c4e8a88e4..1b1e280ecd2 100644 --- a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp +++ b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp @@ -76,10 +76,10 @@ #include "mongo/db/s/transaction_coordinator_service.h" #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/session_catalog.h" +#include "mongo/db/session/session_txn_record_gen.h" #include "mongo/db/storage/storage_parameters_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/start_session_command.cpp b/src/mongo/db/commands/start_session_command.cpp index cdb16ca1fdf..ca14935df92 100644 --- a/src/mongo/db/commands/start_session_command.cpp +++ b/src/mongo/db/commands/start_session_command.cpp @@ -38,10 +38,10 @@ #include "mongo/db/client.h" #include "mongo/db/commands.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_cache.h" -#include "mongo/db/logical_session_id.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/db/stats/top.h" namespace mongo { diff --git a/src/mongo/db/cursor_manager.cpp b/src/mongo/db/cursor_manager.cpp index e27221d40e4..df6e8ef8cbd 100644 --- a/src/mongo/db/cursor_manager.cpp +++ b/src/mongo/db/cursor_manager.cpp @@ -44,13 +44,13 @@ #include "mongo/db/curop.h" #include "mongo/db/cursor_server_params.h" #include "mongo/db/db_raii.h" -#include "mongo/db/kill_sessions_common.h" -#include "mongo/db/logical_session_cache.h" #include "mongo/db/namespace_string.h" #include "mongo/db/operation_context.h" #include "mongo/db/query/plan_executor.h" #include "mongo/db/query/query_knobs_gen.h" #include "mongo/db/service_context.h" +#include "mongo/db/session/kill_sessions_common.h" +#include "mongo/db/session/logical_session_cache.h" #include "mongo/logv2/log.h" #include "mongo/platform/random.h" #include "mongo/util/exit.h" diff --git a/src/mongo/db/cursor_manager.h b/src/mongo/db/cursor_manager.h index 9d0b5a710a8..bce3b05fdea 100644 --- a/src/mongo/db/cursor_manager.h +++ b/src/mongo/db/cursor_manager.h @@ -35,10 +35,10 @@ #include "mongo/db/clientcursor.h" #include "mongo/db/cursor_id.h" #include "mongo/db/generic_cursor.h" -#include "mongo/db/kill_sessions.h" #include "mongo/db/namespace_string.h" #include "mongo/db/record_id.h" -#include "mongo/db/session_killer.h" +#include "mongo/db/session/kill_sessions.h" +#include "mongo/db/session/session_killer.h" #include "mongo/stdx/unordered_map.h" #include "mongo/stdx/unordered_set.h" #include "mongo/util/clock_source.h" diff --git a/src/mongo/db/error_labels.h b/src/mongo/db/error_labels.h index b81a59176d8..08bdb9ff174 100644 --- a/src/mongo/db/error_labels.h +++ b/src/mongo/db/error_labels.h @@ -29,7 +29,7 @@ #pragma once -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" namespace mongo { static constexpr StringData kErrorLabelsFieldName = "errorLabels"_sd; diff --git a/src/mongo/db/error_labels_test.cpp b/src/mongo/db/error_labels_test.cpp index 7d183674952..4607f6501dc 100644 --- a/src/mongo/db/error_labels_test.cpp +++ b/src/mongo/db/error_labels_test.cpp @@ -31,11 +31,11 @@ #include "mongo/db/curop.h" #include "mongo/db/error_labels.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/pipeline/aggregate_command_gen.h" #include "mongo/db/pipeline/aggregation_request_helper.h" #include "mongo/db/pipeline/lite_parsed_pipeline.h" #include "mongo/db/service_context_test_fixture.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/unittest/unittest.h" namespace mongo { diff --git a/src/mongo/db/exec/delete_stage.h b/src/mongo/db/exec/delete_stage.h index 68606216d46..75b5f7cb2fe 100644 --- a/src/mongo/db/exec/delete_stage.h +++ b/src/mongo/db/exec/delete_stage.h @@ -32,7 +32,7 @@ #include "mongo/db/exec/requires_collection_stage.h" #include "mongo/db/exec/write_stage_common.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/db/storage/remove_saver.h" namespace mongo { diff --git a/src/mongo/db/fle_crud_mongod.cpp b/src/mongo/db/fle_crud_mongod.cpp index 353f8463718..22ff5e72f87 100644 --- a/src/mongo/db/fle_crud_mongod.cpp +++ b/src/mongo/db/fle_crud_mongod.cpp @@ -46,9 +46,9 @@ #include "mongo/db/query/find_command_gen.h" #include "mongo/db/query/fle/server_rewrite.h" #include "mongo/db/repl/repl_client_info.h" -#include "mongo/db/session.h" -#include "mongo/db/session_catalog.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/session.h" +#include "mongo/db/session/session_catalog.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/transaction/transaction_api.h" #include "mongo/db/transaction/transaction_participant.h" #include "mongo/db/transaction/transaction_participant_resource_yielder.h" diff --git a/src/mongo/db/generic_cursor.idl b/src/mongo/db/generic_cursor.idl index a08ed68908b..ecb1ded9a10 100644 --- a/src/mongo/db/generic_cursor.idl +++ b/src/mongo/db/generic_cursor.idl @@ -34,7 +34,7 @@ global: cpp_namespace: "mongo" imports: - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/db/repl/replication_types.idl" - "mongo/idl/basic_types.idl" diff --git a/src/mongo/db/logical_session_cache_factory_mongod.cpp b/src/mongo/db/logical_session_cache_factory_mongod.cpp index a1bedbced6b..c71fea1d9e3 100644 --- a/src/mongo/db/logical_session_cache_factory_mongod.cpp +++ b/src/mongo/db/logical_session_cache_factory_mongod.cpp @@ -34,12 +34,12 @@ #include <memory> -#include "mongo/db/logical_session_cache_impl.h" #include "mongo/db/s/sessions_collection_config_server.h" #include "mongo/db/service_liaison_mongod.h" -#include "mongo/db/session_catalog_mongod.h" -#include "mongo/db/sessions_collection_rs.h" -#include "mongo/db/sessions_collection_standalone.h" +#include "mongo/db/session/logical_session_cache_impl.h" +#include "mongo/db/session/session_catalog_mongod.h" +#include "mongo/db/session/sessions_collection_rs.h" +#include "mongo/db/session/sessions_collection_standalone.h" #include "mongo/s/sessions_collection_sharded.h" #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl diff --git a/src/mongo/db/logical_session_cache_factory_mongod.h b/src/mongo/db/logical_session_cache_factory_mongod.h index 25fbec086cc..5bd29849cc1 100644 --- a/src/mongo/db/logical_session_cache_factory_mongod.h +++ b/src/mongo/db/logical_session_cache_factory_mongod.h @@ -31,8 +31,8 @@ #include <memory> -#include "mongo/db/logical_session_cache.h" #include "mongo/db/service_liaison.h" +#include "mongo/db/session/logical_session_cache.h" namespace mongo { diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp index 976a10d10f0..3aceda74989 100644 --- a/src/mongo/db/mongod_main.cpp +++ b/src/mongo/db/mongod_main.cpp @@ -90,10 +90,7 @@ #include "mongo/db/keys_collection_client_direct.h" #include "mongo/db/keys_collection_client_sharded.h" #include "mongo/db/keys_collection_manager.h" -#include "mongo/db/kill_sessions.h" -#include "mongo/db/kill_sessions_local.h" #include "mongo/db/log_process_details.h" -#include "mongo/db/logical_session_cache.h" #include "mongo/db/logical_session_cache_factory_mongod.h" #include "mongo/db/logical_time_validator.h" #include "mongo/db/mirror_maestro.h" @@ -156,8 +153,11 @@ #include "mongo/db/serverless/shard_split_donor_service.h" #include "mongo/db/service_context.h" #include "mongo/db/service_entry_point_mongod.h" -#include "mongo/db/session_catalog.h" -#include "mongo/db/session_killer.h" +#include "mongo/db/session/kill_sessions.h" +#include "mongo/db/session/kill_sessions_local.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/session_catalog.h" +#include "mongo/db/session/session_killer.h" #include "mongo/db/set_change_stream_state_coordinator.h" #include "mongo/db/startup_recovery.h" #include "mongo/db/startup_warnings_mongod.h" diff --git a/src/mongo/db/op_observer/SConscript b/src/mongo/db/op_observer/SConscript index 7c93d45a54f..07dbc1d7ad3 100644 --- a/src/mongo/db/op_observer/SConscript +++ b/src/mongo/db/op_observer/SConscript @@ -79,7 +79,7 @@ env.Library( '$BUILD_DIR/mongo/db/repl/tenant_migration_access_blocker', '$BUILD_DIR/mongo/db/s/sharding_api_d', '$BUILD_DIR/mongo/db/server_feature_flags', - '$BUILD_DIR/mongo/db/session_catalog', + '$BUILD_DIR/mongo/db/session/session_catalog', '$BUILD_DIR/mongo/db/timeseries/bucket_catalog', '$BUILD_DIR/mongo/db/transaction/transaction', '$BUILD_DIR/mongo/db/views/views_mongod', @@ -98,7 +98,7 @@ env.Library( LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/commands/mongod_fcv', - '$BUILD_DIR/mongo/db/kill_sessions_local', + '$BUILD_DIR/mongo/db/session/kill_sessions_local', '$BUILD_DIR/mongo/executor/egress_tag_closer_manager', 'op_observer', 'op_observer_util', diff --git a/src/mongo/db/op_observer/fcv_op_observer.cpp b/src/mongo/db/op_observer/fcv_op_observer.cpp index 5563d522960..6ea3fd00ab8 100644 --- a/src/mongo/db/op_observer/fcv_op_observer.cpp +++ b/src/mongo/db/op_observer/fcv_op_observer.cpp @@ -32,12 +32,12 @@ #include "mongo/db/commands/feature_compatibility_version.h" #include "mongo/db/commands/feature_compatibility_version_parser.h" -#include "mongo/db/kill_sessions_local.h" #include "mongo/db/namespace_string.h" #include "mongo/db/op_observer/op_observer_util.h" #include "mongo/db/operation_context.h" #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/server_options.h" +#include "mongo/db/session/kill_sessions_local.h" #include "mongo/executor/egress_tag_closer_manager.h" #include "mongo/logv2/log.h" #include "mongo/transport/service_entry_point.h" diff --git a/src/mongo/db/op_observer/op_observer_impl.cpp b/src/mongo/db/op_observer/op_observer_impl.cpp index 7f33b75ffc4..37c5e438bc2 100644 --- a/src/mongo/db/op_observer/op_observer_impl.cpp +++ b/src/mongo/db/op_observer/op_observer_impl.cpp @@ -69,7 +69,7 @@ #include "mongo/db/s/sharding_write_router.h" #include "mongo/db/server_feature_flags_gen.h" #include "mongo/db/server_options.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/timeseries/bucket_catalog.h" #include "mongo/db/transaction/transaction_participant.h" #include "mongo/db/transaction/transaction_participant_gen.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 7be654f0491..0842d371c22 100644 --- a/src/mongo/db/op_observer/op_observer_impl_test.cpp +++ b/src/mongo/db/op_observer/op_observer_impl_test.cpp @@ -61,7 +61,7 @@ #include "mongo/db/repl/storage_interface_impl.h" #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/session/session_catalog_mongod.h" #include "mongo/db/transaction/transaction_participant.h" #include "mongo/db/transaction/transaction_participant_gen.h" #include "mongo/idl/server_parameter_test_util.h" diff --git a/src/mongo/db/op_observer/oplog_writer.h b/src/mongo/db/op_observer/oplog_writer.h index 3c9b961913e..b754c6faf57 100644 --- a/src/mongo/db/op_observer/oplog_writer.h +++ b/src/mongo/db/op_observer/oplog_writer.h @@ -35,10 +35,10 @@ #include <vector> #include "mongo/bson/bsonobj.h" -#include "mongo/db/logical_session_id.h" // for StmtId #include "mongo/db/operation_context.h" -#include "mongo/db/repl/oplog.h" // for InsertStatement and OplogLink -#include "mongo/db/repl/oplog_entry.h" // for MutableOplogEntry +#include "mongo/db/repl/oplog.h" // for InsertStatement and OplogLink +#include "mongo/db/repl/oplog_entry.h" // for MutableOplogEntry +#include "mongo/db/session/logical_session_id.h" // for StmtId #include "mongo/s/shard_id.h" namespace mongo { diff --git a/src/mongo/db/operation_context.h b/src/mongo/db/operation_context.h index 07b90bfaff6..211cd9dbe89 100644 --- a/src/mongo/db/operation_context.h +++ b/src/mongo/db/operation_context.h @@ -35,10 +35,10 @@ #include "mongo/base/status.h" #include "mongo/db/client.h" #include "mongo/db/concurrency/locker.h" -#include "mongo/db/logical_session_id.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_id.h" #include "mongo/db/query/datetime/date_time_support.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/db/storage/recovery_unit.h" #include "mongo/db/storage/storage_options.h" #include "mongo/db/storage/write_unit_of_work.h" diff --git a/src/mongo/db/operation_context_test.cpp b/src/mongo/db/operation_context_test.cpp index f4d07fecd4f..d1bcb2592f2 100644 --- a/src/mongo/db/operation_context_test.cpp +++ b/src/mongo/db/operation_context_test.cpp @@ -36,11 +36,11 @@ #include "mongo/db/client.h" #include "mongo/db/curop.h" #include "mongo/db/json.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/operation_context.h" #include "mongo/db/operation_context_group.h" #include "mongo/db/service_context.h" #include "mongo/db/service_context_test_fixture.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/logv2/log.h" #include "mongo/stdx/future.h" #include "mongo/stdx/thread.h" diff --git a/src/mongo/db/ops/SConscript b/src/mongo/db/ops/SConscript index 47f551b863b..87bf184ef13 100644 --- a/src/mongo/db/ops/SConscript +++ b/src/mongo/db/ops/SConscript @@ -121,7 +121,7 @@ env.CppUnitTest( '$BUILD_DIR/mongo/db/query_exec', '$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/session/session_catalog', '$BUILD_DIR/mongo/db/transaction/transaction', 'write_ops', 'write_ops_exec', diff --git a/src/mongo/db/ops/delete_request.idl b/src/mongo/db/ops/delete_request.idl index 7571bfb329d..498d52943ab 100644 --- a/src/mongo/db/ops/delete_request.idl +++ b/src/mongo/db/ops/delete_request.idl @@ -29,11 +29,11 @@ global: cpp_namespace: "mongo" cpp_includes: - - "mongo/db/logical_session_id.h" + - "mongo/db/session/logical_session_id.h" - "mongo/db/query/plan_executor.h" imports: - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/db/pipeline/legacy_runtime_constants.idl" - "mongo/idl/basic_types.idl" - "mongo/db/query/hint.idl" diff --git a/src/mongo/db/ops/update_request.h b/src/mongo/db/ops/update_request.h index 9c49e90fad6..ed775c9e15e 100644 --- a/src/mongo/db/ops/update_request.h +++ b/src/mongo/db/ops/update_request.h @@ -31,11 +31,11 @@ #include "mongo/db/curop.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/namespace_string.h" #include "mongo/db/ops/write_ops.h" #include "mongo/db/pipeline/legacy_runtime_constants_gen.h" #include "mongo/db/query/explain.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/ops/write_ops.idl b/src/mongo/db/ops/write_ops.idl index 64af814e752..8c499edbf89 100644 --- a/src/mongo/db/ops/write_ops.idl +++ b/src/mongo/db/ops/write_ops.idl @@ -35,7 +35,7 @@ global: imports: - "mongo/crypto/fle_field_schema.idl" - "mongo/db/auth/action_type.idl" - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/db/pipeline/legacy_runtime_constants.idl" - "mongo/db/query/hint.idl" - "mongo/idl/basic_types.idl" 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 056f219cc83..4f6beda116f 100644 --- a/src/mongo/db/periodic_runner_job_abort_expired_transactions.cpp +++ b/src/mongo/db/periodic_runner_job_abort_expired_transactions.cpp @@ -33,8 +33,8 @@ #include "mongo/db/periodic_runner_job_abort_expired_transactions.h" #include "mongo/db/client.h" -#include "mongo/db/kill_sessions_local.h" #include "mongo/db/service_context.h" +#include "mongo/db/session/kill_sessions_local.h" #include "mongo/db/transaction/transaction_participant.h" #include "mongo/db/transaction/transaction_participant_gen.h" #include "mongo/logv2/log.h" diff --git a/src/mongo/db/pipeline/SConscript b/src/mongo/db/pipeline/SConscript index 5eb07049e26..2b648db4ee2 100644 --- a/src/mongo/db/pipeline/SConscript +++ b/src/mongo/db/pipeline/SConscript @@ -351,8 +351,6 @@ pipelineEnv.Library( '$BUILD_DIR/mongo/db/exec/sort_executor', '$BUILD_DIR/mongo/db/generic_cursor', '$BUILD_DIR/mongo/db/index/key_generator', - '$BUILD_DIR/mongo/db/logical_session_cache', - '$BUILD_DIR/mongo/db/logical_session_id_helpers', '$BUILD_DIR/mongo/db/matcher/expressions', '$BUILD_DIR/mongo/db/pipeline/change_stream_error_extra_info', '$BUILD_DIR/mongo/db/pipeline/lite_parsed_document_source', @@ -368,7 +366,9 @@ pipelineEnv.Library( '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', '$BUILD_DIR/mongo/db/repl/speculative_majority_read_info', '$BUILD_DIR/mongo/db/service_context', - '$BUILD_DIR/mongo/db/sessions_collection', + '$BUILD_DIR/mongo/db/session/logical_session_cache', + '$BUILD_DIR/mongo/db/session/logical_session_id_helpers', + '$BUILD_DIR/mongo/db/session/sessions_collection', '$BUILD_DIR/mongo/db/stats/resource_consumption_metrics', '$BUILD_DIR/mongo/db/storage/encryption_hooks', '$BUILD_DIR/mongo/db/storage/index_entry_comparison', diff --git a/src/mongo/db/pipeline/document_source_find_and_modify_image_lookup_test.cpp b/src/mongo/db/pipeline/document_source_find_and_modify_image_lookup_test.cpp index 3c21e19a3f7..86939d47e16 100644 --- a/src/mongo/db/pipeline/document_source_find_and_modify_image_lookup_test.cpp +++ b/src/mongo/db/pipeline/document_source_find_and_modify_image_lookup_test.cpp @@ -34,7 +34,6 @@ #include "mongo/db/commands/txn_cmds_gen.h" #include "mongo/db/exec/document_value/document.h" #include "mongo/db/exec/document_value/document_value_test_util.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/matcher/matcher.h" #include "mongo/db/namespace_string.h" #include "mongo/db/pipeline/aggregation_context_fixture.h" @@ -44,6 +43,7 @@ #include "mongo/db/pipeline/process_interface/stub_lookup_single_document_process_interface.h" #include "mongo/db/repl/apply_ops_command_info.h" #include "mongo/db/repl/image_collection_entry_gen.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" diff --git a/src/mongo/db/pipeline/document_source_list_cached_and_active_users.cpp b/src/mongo/db/pipeline/document_source_list_cached_and_active_users.cpp index 535d4ebb1e2..835a3598099 100644 --- a/src/mongo/db/pipeline/document_source_list_cached_and_active_users.cpp +++ b/src/mongo/db/pipeline/document_source_list_cached_and_active_users.cpp @@ -34,7 +34,7 @@ #include "mongo/db/auth/authorization_session.h" #include "mongo/db/auth/user_name.h" #include "mongo/db/commands/test_commands_enabled.h" -#include "mongo/db/logical_session_id_helpers.h" +#include "mongo/db/session/logical_session_id_helpers.h" namespace mongo { diff --git a/src/mongo/db/pipeline/document_source_list_local_sessions.cpp b/src/mongo/db/pipeline/document_source_list_local_sessions.cpp index 95bc338659e..637171d2e7e 100644 --- a/src/mongo/db/pipeline/document_source_list_local_sessions.cpp +++ b/src/mongo/db/pipeline/document_source_list_local_sessions.cpp @@ -31,9 +31,9 @@ #include "mongo/db/auth/authorization_session.h" #include "mongo/db/auth/user_name.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/pipeline/document_source_list_local_sessions.h" #include "mongo/db/pipeline/document_source_list_sessions_gen.h" +#include "mongo/db/session/logical_session_id_helpers.h" namespace mongo { diff --git a/src/mongo/db/pipeline/document_source_list_local_sessions.h b/src/mongo/db/pipeline/document_source_list_local_sessions.h index 5306fc1fb7e..f91ebb90dd1 100644 --- a/src/mongo/db/pipeline/document_source_list_local_sessions.h +++ b/src/mongo/db/pipeline/document_source_list_local_sessions.h @@ -34,10 +34,10 @@ #include "mongo/bson/bsonmisc.h" #include "mongo/bson/bsonobj.h" #include "mongo/crypto/sha256_block.h" -#include "mongo/db/logical_session_cache.h" #include "mongo/db/pipeline/document_source.h" #include "mongo/db/pipeline/document_source_list_sessions_gen.h" #include "mongo/db/pipeline/lite_parsed_document_source.h" +#include "mongo/db/session/logical_session_cache.h" namespace mongo { diff --git a/src/mongo/db/pipeline/document_source_list_sessions.cpp b/src/mongo/db/pipeline/document_source_list_sessions.cpp index 1ee6a2eccaa..40d279f3c15 100644 --- a/src/mongo/db/pipeline/document_source_list_sessions.cpp +++ b/src/mongo/db/pipeline/document_source_list_sessions.cpp @@ -30,11 +30,11 @@ #include "mongo/platform/basic.h" #include "mongo/bson/bsonobj.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/matcher/expression_parser.h" #include "mongo/db/matcher/extensions_callback_noop.h" #include "mongo/db/pipeline/document_source_list_sessions.h" #include "mongo/db/pipeline/document_source_list_sessions_gen.h" +#include "mongo/db/session/logical_session_id_helpers.h" namespace mongo { diff --git a/src/mongo/db/pipeline/process_interface/SConscript b/src/mongo/db/pipeline/process_interface/SConscript index 3578d0b463f..51f028e811b 100644 --- a/src/mongo/db/pipeline/process_interface/SConscript +++ b/src/mongo/db/pipeline/process_interface/SConscript @@ -56,7 +56,7 @@ env.Library( '$BUILD_DIR/mongo/db/ops/write_ops', '$BUILD_DIR/mongo/db/repl/primary_only_service', '$BUILD_DIR/mongo/db/server_feature_flags', - '$BUILD_DIR/mongo/db/session_catalog', + '$BUILD_DIR/mongo/db/session/session_catalog', '$BUILD_DIR/mongo/db/stats/fill_locker_info', '$BUILD_DIR/mongo/db/storage/backup_cursor_hooks', '$BUILD_DIR/mongo/scripting/scripting_common', @@ -114,7 +114,7 @@ env.Library( 'common_process_interface', ], LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/db/session_catalog', + '$BUILD_DIR/mongo/db/session/session_catalog', ], ) 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 e200ba40bf3..9b9f7fde37b 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 @@ -62,7 +62,7 @@ #include "mongo/db/s/transaction_coordinator_curop.h" #include "mongo/db/s/transaction_coordinator_worker_curop_repository.h" #include "mongo/db/server_feature_flags_gen.h" -#include "mongo/db/session_catalog.h" +#include "mongo/db/session/session_catalog.h" #include "mongo/db/stats/fill_locker_info.h" #include "mongo/db/stats/storage_stats.h" #include "mongo/db/storage/backup_cursor_hooks.h" diff --git a/src/mongo/db/pipeline/process_interface/replica_set_node_process_interface.cpp b/src/mongo/db/pipeline/process_interface/replica_set_node_process_interface.cpp index 7c8f8556d88..9d2e685b185 100644 --- a/src/mongo/db/pipeline/process_interface/replica_set_node_process_interface.cpp +++ b/src/mongo/db/pipeline/process_interface/replica_set_node_process_interface.cpp @@ -37,9 +37,9 @@ #include "mongo/db/concurrency/d_concurrency.h" #include "mongo/db/db_raii.h" #include "mongo/db/index_builds_coordinator.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_time_tracker.h" #include "mongo/db/repl/repl_client_info.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/write_ops/batched_command_request.h" #include "mongo/s/write_ops/batched_command_response.h" diff --git a/src/mongo/db/query/SConscript b/src/mongo/db/query/SConscript index 362a7e796f4..60006fb136d 100644 --- a/src/mongo/db/query/SConscript +++ b/src/mongo/db/query/SConscript @@ -281,8 +281,8 @@ env.Library( "query_test_service_context.cpp", ], LIBDEPS=[ - "$BUILD_DIR/mongo/db/logical_session_id", "$BUILD_DIR/mongo/db/service_context", + "$BUILD_DIR/mongo/db/session/logical_session_id", "collation/collator_factory_mock", ], LIBDEPS_PRIVATE=[], diff --git a/src/mongo/db/query/find_command.idl b/src/mongo/db/query/find_command.idl index 7904800de5f..448d52dc1ca 100644 --- a/src/mongo/db/query/find_command.idl +++ b/src/mongo/db/query/find_command.idl @@ -39,7 +39,7 @@ imports: - "mongo/crypto/fle_field_schema.idl" - "mongo/db/auth/action_type.idl" - "mongo/db/auth/access_checks.idl" - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/db/pipeline/legacy_runtime_constants.idl" - "mongo/idl/basic_types.idl" - "mongo/db/query/cursor_response.idl" diff --git a/src/mongo/db/query/query_test_service_context.h b/src/mongo/db/query/query_test_service_context.h index 50929a677a9..e83901a3fdd 100644 --- a/src/mongo/db/query/query_test_service_context.h +++ b/src/mongo/db/query/query_test_service_context.h @@ -30,8 +30,8 @@ #pragma once #include "mongo/db/client.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/service_context.h" +#include "mongo/db/session/logical_session_id.h" namespace mongo { diff --git a/src/mongo/db/repl/SConscript b/src/mongo/db/repl/SConscript index d4b3d4b9fcc..0e9cc894058 100644 --- a/src/mongo/db/repl/SConscript +++ b/src/mongo/db/repl/SConscript @@ -540,11 +540,11 @@ env.Library( '$BUILD_DIR/mongo/db/catalog/import_collection_oplog_entry', '$BUILD_DIR/mongo/db/concurrency/lock_manager', '$BUILD_DIR/mongo/db/index_builds_coordinator_interface', - '$BUILD_DIR/mongo/db/kill_sessions_local', '$BUILD_DIR/mongo/db/multitenancy', '$BUILD_DIR/mongo/db/ops/write_ops', '$BUILD_DIR/mongo/db/repl/tenant_migration_access_blocker', '$BUILD_DIR/mongo/db/s/sharding_runtime_d', + '$BUILD_DIR/mongo/db/session/kill_sessions_local', '$BUILD_DIR/mongo/db/storage/historical_ident_tracker', '$BUILD_DIR/mongo/idl/server_parameter', 'drop_pending_collection_reaper', @@ -649,8 +649,8 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/common', - '$BUILD_DIR/mongo/db/logical_session_id', '$BUILD_DIR/mongo/db/namespace_string', + '$BUILD_DIR/mongo/db/session/logical_session_id', 'oplog_entry', 'optime', ], @@ -731,11 +731,11 @@ env.Library( '$BUILD_DIR/mongo/db/common', '$BUILD_DIR/mongo/db/concurrency/lock_manager', '$BUILD_DIR/mongo/db/index/index_descriptor', - '$BUILD_DIR/mongo/db/kill_sessions_local', '$BUILD_DIR/mongo/db/mongod_options', '$BUILD_DIR/mongo/db/prepare_conflict_tracker', '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/db/service_context', + '$BUILD_DIR/mongo/db/session/kill_sessions_local', '$BUILD_DIR/mongo/executor/task_executor_interface', '$BUILD_DIR/mongo/rpc/command_status', '$BUILD_DIR/mongo/rpc/metadata', @@ -758,7 +758,7 @@ env.Library( '$BUILD_DIR/mongo/db/catalog/local_oplog_info', '$BUILD_DIR/mongo/db/commands/test_commands_enabled', '$BUILD_DIR/mongo/db/index_builds_coordinator_interface', - '$BUILD_DIR/mongo/db/session_catalog', + '$BUILD_DIR/mongo/db/session/session_catalog', '$BUILD_DIR/mongo/db/storage/journal_flusher', '$BUILD_DIR/mongo/idl/server_parameter', 'delayable_timeout_callback', @@ -1506,12 +1506,12 @@ env.Library( '$BUILD_DIR/mongo/db/concurrency/lock_manager', '$BUILD_DIR/mongo/db/curop', '$BUILD_DIR/mongo/db/free_mon/free_mon_mongod', - '$BUILD_DIR/mongo/db/kill_sessions_local', '$BUILD_DIR/mongo/db/logical_time', '$BUILD_DIR/mongo/db/not_primary_error_tracker', '$BUILD_DIR/mongo/db/op_observer/op_observer', '$BUILD_DIR/mongo/db/query_exec', '$BUILD_DIR/mongo/db/service_context', + '$BUILD_DIR/mongo/db/session/kill_sessions_local', '$BUILD_DIR/mongo/db/stats/counters', '$BUILD_DIR/mongo/db/system_index', '$BUILD_DIR/mongo/db/vector_clock', @@ -1720,7 +1720,6 @@ if wiredtiger: '$BUILD_DIR/mongo/db/index/index_access_methods', '$BUILD_DIR/mongo/db/index_build_entry_helpers', '$BUILD_DIR/mongo/db/index_builds_coordinator_mongod', - '$BUILD_DIR/mongo/db/logical_session_id_helpers', '$BUILD_DIR/mongo/db/logical_time', '$BUILD_DIR/mongo/db/multitenancy', '$BUILD_DIR/mongo/db/op_observer/op_observer_impl', @@ -1730,6 +1729,7 @@ if wiredtiger: '$BUILD_DIR/mongo/db/s/sharding_runtime_d', '$BUILD_DIR/mongo/db/service_context_d_test_fixture', '$BUILD_DIR/mongo/db/service_context_test_fixture', + '$BUILD_DIR/mongo/db/session/logical_session_id_helpers', '$BUILD_DIR/mongo/db/stats/counters', '$BUILD_DIR/mongo/db/storage/storage_control', '$BUILD_DIR/mongo/db/transaction/transaction', @@ -2020,7 +2020,7 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/logical_session_id', + '$BUILD_DIR/mongo/db/session/logical_session_id', '$BUILD_DIR/mongo/idl/idl_parser', 'oplog_entry', ], diff --git a/src/mongo/db/repl/apply_ops.cpp b/src/mongo/db/repl/apply_ops.cpp index fe04751ae12..f7874d41153 100644 --- a/src/mongo/db/repl/apply_ops.cpp +++ b/src/mongo/db/repl/apply_ops.cpp @@ -51,7 +51,7 @@ #include "mongo/db/query/collation/collation_spec.h" #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/service_context.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/session_catalog_mongod.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/repl/idempotency_test_fixture.cpp b/src/mongo/db/repl/idempotency_test_fixture.cpp index 18f920b1ffd..71c5f5f47a9 100644 --- a/src/mongo/db/repl/idempotency_test_fixture.cpp +++ b/src/mongo/db/repl/idempotency_test_fixture.cpp @@ -47,7 +47,6 @@ #include "mongo/db/db_raii.h" #include "mongo/db/index_builds_coordinator.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/query/internal_plans.h" #include "mongo/db/repl/bgsync.h" #include "mongo/db/repl/drop_pending_collection_reaper.h" @@ -59,6 +58,7 @@ #include "mongo/db/repl/replication_consistency_markers_mock.h" #include "mongo/db/repl/replication_coordinator_mock.h" #include "mongo/db/repl/storage_interface.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/util/md5.hpp" namespace mongo { diff --git a/src/mongo/db/repl/idempotency_test_fixture.h b/src/mongo/db/repl/idempotency_test_fixture.h index 93766f8d51e..52b0ccb2c4f 100644 --- a/src/mongo/db/repl/idempotency_test_fixture.h +++ b/src/mongo/db/repl/idempotency_test_fixture.h @@ -38,11 +38,11 @@ #include "mongo/bson/simple_bsonobj_comparator.h" #include "mongo/bson/timestamp.h" #include "mongo/db/catalog/collection_options.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/namespace_string.h" #include "mongo/db/repl/oplog_applier_impl_test_fixture.h" #include "mongo/db/repl/oplog_entry.h" #include "mongo/db/repl/optime.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/util/duration.h" #include "mongo/util/uuid.h" diff --git a/src/mongo/db/repl/image_collection_entry.idl b/src/mongo/db/repl/image_collection_entry.idl index 50a0a1802fc..e1bba459ed7 100644 --- a/src/mongo/db/repl/image_collection_entry.idl +++ b/src/mongo/db/repl/image_collection_entry.idl @@ -33,7 +33,7 @@ global: imports: - "mongo/idl/basic_types.idl" - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/db/repl/oplog_entry.idl" structs: diff --git a/src/mongo/db/repl/initial_syncer.cpp b/src/mongo/db/repl/initial_syncer.cpp index a5fa6c4766a..709893dde28 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/transaction/session_txn_record_gen.h" +#include "mongo/db/session/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.h b/src/mongo/db/repl/oplog.h index c3c9c2de13a..f3af3ff146f 100644 --- a/src/mongo/db/repl/oplog.h +++ b/src/mongo/db/repl/oplog.h @@ -37,11 +37,11 @@ #include "mongo/bson/bsonobj.h" #include "mongo/bson/timestamp.h" #include "mongo/db/catalog/collection_options.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/repl/oplog_entry.h" #include "mongo/db/repl/oplog_entry_or_grouped_inserts.h" #include "mongo/db/repl/optime.h" #include "mongo/db/repl/replication_coordinator.h" +#include "mongo/db/session/logical_session_id.h" namespace mongo { class Collection; diff --git a/src/mongo/db/repl/oplog_applier_impl.cpp b/src/mongo/db/repl/oplog_applier_impl.cpp index 8dfbdbd24f6..e12c57e0384 100644 --- a/src/mongo/db/repl/oplog_applier_impl.cpp +++ b/src/mongo/db/repl/oplog_applier_impl.cpp @@ -38,11 +38,11 @@ #include "mongo/db/change_stream_change_collection_manager.h" #include "mongo/db/client.h" #include "mongo/db/db_raii.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/repl/apply_ops.h" #include "mongo/db/repl/oplog_applier_utils.h" #include "mongo/db/repl/repl_server_parameters_gen.h" #include "mongo/db/repl/transaction_oplog_application.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/db/stats/counters.h" #include "mongo/db/stats/timer_stats.h" #include "mongo/db/storage/control/journal_flusher.h" diff --git a/src/mongo/db/repl/oplog_applier_impl_test.cpp b/src/mongo/db/repl/oplog_applier_impl_test.cpp index 63aa5ed2092..cec936a5ce1 100644 --- a/src/mongo/db/repl/oplog_applier_impl_test.cpp +++ b/src/mongo/db/repl/oplog_applier_impl_test.cpp @@ -49,7 +49,6 @@ #include "mongo/db/db_raii.h" #include "mongo/db/dbdirectclient.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/ops/write_ops.h" #include "mongo/db/pipeline/change_stream_preimage_gen.h" #include "mongo/db/query/internal_plans.h" @@ -64,9 +63,10 @@ #include "mongo/db/repl/replication_process.h" #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/logical_session_id_helpers.h" +#include "mongo/db/session/session_catalog_mongod.h" +#include "mongo/db/session/session_txn_record_gen.h" #include "mongo/db/stats/counters.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" 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 7f78085ff7e..1b5449fa739 100644 --- a/src/mongo/db/repl/oplog_applier_impl_test_fixture.h +++ b/src/mongo/db/repl/oplog_applier_impl_test_fixture.h @@ -32,12 +32,12 @@ #include "mongo/base/status.h" #include "mongo/db/concurrency/lock_manager_defs.h" #include "mongo/db/db_raii.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/op_observer/op_observer_noop.h" #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/transaction/session_txn_record_gen.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/session_txn_record_gen.h" namespace mongo { diff --git a/src/mongo/db/repl/oplog_entry.h b/src/mongo/db/repl/oplog_entry.h index 9e90b15a310..ef96c66e39c 100644 --- a/src/mongo/db/repl/oplog_entry.h +++ b/src/mongo/db/repl/oplog_entry.h @@ -32,11 +32,11 @@ #include "mongo/bson/bsonobj.h" #include "mongo/bson/simple_bsonobj_comparator.h" #include "mongo/db/catalog/collection_options.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/repl/apply_ops_gen.h" #include "mongo/db/repl/oplog_entry_gen.h" #include "mongo/db/repl/optime.h" #include "mongo/db/server_feature_flags_gen.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/util/overloaded_visitor.h" namespace mongo { diff --git a/src/mongo/db/repl/oplog_entry.idl b/src/mongo/db/repl/oplog_entry.idl index 987f5806cbf..8b74b363609 100644 --- a/src/mongo/db/repl/oplog_entry.idl +++ b/src/mongo/db/repl/oplog_entry.idl @@ -33,7 +33,7 @@ global: imports: - "mongo/idl/basic_types.idl" - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/db/pipeline/value.idl" - "mongo/db/repl/optime_base.idl" - "mongo/db/repl/replication_types.idl" diff --git a/src/mongo/db/repl/oplog_entry_test_helpers.h b/src/mongo/db/repl/oplog_entry_test_helpers.h index 0375ed8a30f..578f1fdd701 100644 --- a/src/mongo/db/repl/oplog_entry_test_helpers.h +++ b/src/mongo/db/repl/oplog_entry_test_helpers.h @@ -30,10 +30,10 @@ #pragma once #include "mongo/bson/bsonobj.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/namespace_string.h" #include "mongo/db/repl/oplog_entry.h" #include "mongo/db/repl/optime.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/util/uuid.h" namespace mongo { diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp index 4b65b140249..e4430c8aef8 100644 --- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp @@ -57,7 +57,6 @@ #include "mongo/db/free_mon/free_mon_mongod.h" #include "mongo/db/index_builds_coordinator.h" #include "mongo/db/jsobj.h" -#include "mongo/db/kill_sessions_local.h" #include "mongo/db/logical_time_validator.h" #include "mongo/db/op_observer/op_observer.h" #include "mongo/db/query/query_feature_flags_gen.h" @@ -92,7 +91,8 @@ #include "mongo/db/s/transaction_coordinator_service.h" #include "mongo/db/server_options.h" #include "mongo/db/service_context.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/kill_sessions_local.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/storage/control/journal_flusher.h" #include "mongo/db/storage/flow_control.h" #include "mongo/db/storage/storage_engine.h" diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp index 622c32db0dd..2a8eec4863b 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl.cpp @@ -59,7 +59,6 @@ #include "mongo/db/dbdirectclient.h" #include "mongo/db/index/index_descriptor.h" #include "mongo/db/index_builds_coordinator.h" -#include "mongo/db/kill_sessions_local.h" #include "mongo/db/mongod_options_storage_gen.h" #include "mongo/db/prepare_conflict_tracker.h" #include "mongo/db/read_write_concern_defaults.h" @@ -89,7 +88,8 @@ #include "mongo/db/repl/update_position_args.h" #include "mongo/db/repl/vote_requester.h" #include "mongo/db/server_options.h" -#include "mongo/db/session_catalog.h" +#include "mongo/db/session/kill_sessions_local.h" +#include "mongo/db/session/session_catalog.h" #include "mongo/db/shutdown_in_progress_quiesce_info.h" #include "mongo/db/storage/control/journal_flusher.h" #include "mongo/db/storage/storage_options.h" diff --git a/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp b/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp index 2051b421805..59c30e9cd41 100644 --- a/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp @@ -45,7 +45,6 @@ #include "mongo/db/commands/test_commands_enabled.h" #include "mongo/db/global_settings.h" #include "mongo/db/index_builds_coordinator.h" -#include "mongo/db/kill_sessions_local.h" #include "mongo/db/operation_context.h" #include "mongo/db/repl/heartbeat_response_action.h" #include "mongo/db/repl/repl_server_parameters_gen.h" @@ -60,6 +59,7 @@ #include "mongo/db/repl/topology_coordinator.h" #include "mongo/db/repl/vote_requester.h" #include "mongo/db/service_context.h" +#include "mongo/db/session/kill_sessions_local.h" #include "mongo/db/storage/control/journal_flusher.h" #include "mongo/logv2/log.h" #include "mongo/platform/mutex.h" diff --git a/src/mongo/db/repl/replication_info.cpp b/src/mongo/db/repl/replication_info.cpp index f65648b7c24..868aa7691af 100644 --- a/src/mongo/db/repl/replication_info.cpp +++ b/src/mongo/db/repl/replication_info.cpp @@ -45,7 +45,6 @@ #include "mongo/db/dbhelpers.h" #include "mongo/db/exec/working_set_common.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/namespace_string.h" #include "mongo/db/not_primary_error_tracker.h" #include "mongo/db/ops/write_ops.h" @@ -60,6 +59,7 @@ #include "mongo/db/repl/replication_process.h" #include "mongo/db/repl/storage_interface.h" #include "mongo/db/s/global_user_write_block_state.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/db/storage/storage_options.h" #include "mongo/db/wire_version.h" #include "mongo/executor/network_interface.h" diff --git a/src/mongo/db/repl/replication_recovery.cpp b/src/mongo/db/repl/replication_recovery.cpp index efa3b502ecd..3ac6b996133 100644 --- a/src/mongo/db/repl/replication_recovery.cpp +++ b/src/mongo/db/repl/replication_recovery.cpp @@ -50,7 +50,7 @@ #include "mongo/db/repl/storage_interface.h" #include "mongo/db/repl/transaction_oplog_application.h" #include "mongo/db/server_recovery.h" -#include "mongo/db/session.h" +#include "mongo/db/session/session.h" #include "mongo/db/storage/control/journal_flusher.h" #include "mongo/db/storage/durable_history_pin.h" #include "mongo/db/storage/storage_parameters_gen.h" diff --git a/src/mongo/db/repl/replication_recovery_test.cpp b/src/mongo/db/repl/replication_recovery_test.cpp index f5c98d978a4..5e57d595ef2 100644 --- a/src/mongo/db/repl/replication_recovery_test.cpp +++ b/src/mongo/db/repl/replication_recovery_test.cpp @@ -45,11 +45,11 @@ #include "mongo/db/repl/replication_recovery.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/session_catalog_mongod.h" +#include "mongo/db/session/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/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" diff --git a/src/mongo/db/repl/rollback_impl.cpp b/src/mongo/db/repl/rollback_impl.cpp index 8c24e24e88f..07d3eb76fd7 100644 --- a/src/mongo/db/repl/rollback_impl.cpp +++ b/src/mongo/db/repl/rollback_impl.cpp @@ -45,7 +45,6 @@ #include "mongo/db/dbdirectclient.h" #include "mongo/db/dbhelpers.h" #include "mongo/db/index_builds_coordinator.h" -#include "mongo/db/kill_sessions_local.h" #include "mongo/db/logical_time_validator.h" #include "mongo/db/operation_context.h" #include "mongo/db/repl/apply_ops.h" @@ -59,10 +58,11 @@ #include "mongo/db/repl/transaction_oplog_application.h" #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/kill_sessions_local.h" +#include "mongo/db/session/session_catalog_mongod.h" +#include "mongo/db/session/session_txn_record_gen.h" #include "mongo/db/storage/historical_ident_tracker.h" #include "mongo/db/storage/remove_saver.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" diff --git a/src/mongo/db/repl/rollback_impl_test.cpp b/src/mongo/db/repl/rollback_impl_test.cpp index 8763f8b840d..768d9e4c2a6 100644 --- a/src/mongo/db/repl/rollback_impl_test.cpp +++ b/src/mongo/db/repl/rollback_impl_test.cpp @@ -36,8 +36,6 @@ #include "mongo/db/catalog/collection_mock.h" #include "mongo/db/catalog/drop_collection.h" #include "mongo/db/index/index_descriptor.h" -#include "mongo/db/logical_session_id_gen.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/repl/drop_pending_collection_reaper.h" #include "mongo/db/repl/oplog_entry.h" #include "mongo/db/repl/oplog_interface_local.h" @@ -47,6 +45,8 @@ #include "mongo/db/s/operation_sharding_state.h" #include "mongo/db/s/type_shard_identity.h" #include "mongo/db/service_context.h" +#include "mongo/db/session/logical_session_id_gen.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/logv2/log.h" #include "mongo/s/catalog/type_config_version.h" #include "mongo/stdx/thread.h" diff --git a/src/mongo/db/repl/rs_rollback.cpp b/src/mongo/db/repl/rs_rollback.cpp index d3b380459e2..cbd584834cd 100644 --- a/src/mongo/db/repl/rs_rollback.cpp +++ b/src/mongo/db/repl/rs_rollback.cpp @@ -52,7 +52,6 @@ #include "mongo/db/dbhelpers.h" #include "mongo/db/exec/working_set_common.h" #include "mongo/db/index_builds_coordinator.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/logical_time_validator.h" #include "mongo/db/ops/delete.h" #include "mongo/db/ops/update.h" @@ -69,7 +68,8 @@ #include "mongo/db/repl/roll_back_local_operations.h" #include "mongo/db/repl/rollback_source.h" #include "mongo/db/s/shard_identity_rollback_notifier.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/storage/control/journal_flusher.h" #include "mongo/db/storage/remove_saver.h" #include "mongo/db/transaction/transaction_participant.h" diff --git a/src/mongo/db/repl/session_update_tracker.cpp b/src/mongo/db/repl/session_update_tracker.cpp index 1ad7b4a95b2..cd0d02e95d1 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/ops/write_ops_retryability.h" #include "mongo/db/repl/oplog_entry.h" #include "mongo/db/server_options.h" -#include "mongo/db/session.h" -#include "mongo/db/transaction/session_txn_record_gen.h" +#include "mongo/db/session/session.h" +#include "mongo/db/session/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" diff --git a/src/mongo/db/repl/session_update_tracker.h b/src/mongo/db/repl/session_update_tracker.h index b792a3b3235..c3d16da1465 100644 --- a/src/mongo/db/repl/session_update_tracker.h +++ b/src/mongo/db/repl/session_update_tracker.h @@ -34,8 +34,8 @@ #include <vector> #include "mongo/bson/bsonobj.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/repl/oplog_entry.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/util/uuid.h" namespace mongo { diff --git a/src/mongo/db/repl/storage_timestamp_test.cpp b/src/mongo/db/repl/storage_timestamp_test.cpp index 1a63b3b764e..e3e695be9b0 100644 --- a/src/mongo/db/repl/storage_timestamp_test.cpp +++ b/src/mongo/db/repl/storage_timestamp_test.cpp @@ -77,8 +77,8 @@ #include "mongo/db/s/collection_sharding_state_factory_shard.h" #include "mongo/db/service_context.h" #include "mongo/db/service_context_d_test_fixture.h" -#include "mongo/db/session.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/session.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/storage/snapshot_manager.h" #include "mongo/db/storage/storage_engine_impl.h" #include "mongo/db/transaction/transaction_participant.h" diff --git a/src/mongo/db/repl/tenant_migration_recipient_service.cpp b/src/mongo/db/repl/tenant_migration_recipient_service.cpp index 068853273b2..7f3b1e2474f 100644 --- a/src/mongo/db/repl/tenant_migration_recipient_service.cpp +++ b/src/mongo/db/repl/tenant_migration_recipient_service.cpp @@ -69,9 +69,9 @@ #include "mongo/db/repl/tenant_migration_state_machine_gen.h" #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/session_catalog_mongod.h" +#include "mongo/db/session/session_txn_record_gen.h" #include "mongo/db/storage/wiredtiger/wiredtiger_import.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" 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 50135f651db..acc80047451 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/transaction/session_txn_record_gen.h" +#include "mongo/db/session/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 6f3e1b9c9b8..098439436ee 100644 --- a/src/mongo/db/repl/tenant_oplog_applier.cpp +++ b/src/mongo/db/repl/tenant_oplog_applier.cpp @@ -51,7 +51,7 @@ #include "mongo/db/repl/tenant_migration_decoration.h" #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/session/session_catalog_mongod.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/tenant_oplog_applier_test.cpp b/src/mongo/db/repl/tenant_oplog_applier_test.cpp index bf77f11a540..c56dc234c02 100644 --- a/src/mongo/db/repl/tenant_oplog_applier_test.cpp +++ b/src/mongo/db/repl/tenant_oplog_applier_test.cpp @@ -33,7 +33,6 @@ #include <vector> #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/op_observer/op_observer_noop.h" #include "mongo/db/op_observer/op_observer_registry.h" #include "mongo/db/repl/oplog_applier_impl_test_fixture.h" @@ -48,7 +47,8 @@ #include "mongo/db/repl/tenant_oplog_batcher.h" #include "mongo/db/service_context_d_test_fixture.h" #include "mongo/db/service_context_test_fixture.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/logical_session_id_helpers.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/tenant_id.h" #include "mongo/db/update/update_oplog_entry_serialization.h" #include "mongo/executor/thread_pool_task_executor_test_fixture.h" diff --git a/src/mongo/db/repl/transaction_oplog_application.cpp b/src/mongo/db/repl/transaction_oplog_application.cpp index 6e647cf8432..3c363078a6f 100644 --- a/src/mongo/db/repl/transaction_oplog_application.cpp +++ b/src/mongo/db/repl/transaction_oplog_application.cpp @@ -40,7 +40,7 @@ #include "mongo/db/repl/apply_ops.h" #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/session/session_catalog_mongod.h" #include "mongo/db/transaction/transaction_history_iterator.h" #include "mongo/db/transaction/transaction_participant.h" #include "mongo/logv2/log.h" diff --git a/src/mongo/db/s/README.md b/src/mongo/db/s/README.md index 19ed6cdf624..456c8bf5404 100644 --- a/src/mongo/db/s/README.md +++ b/src/mongo/db/s/README.md @@ -840,7 +840,7 @@ the following steps will be performed: * [Place where a session is placed (or replaced) in the logical session cache](https://github.com/mongodb/mongo/blob/1f94484d52064e12baedc7b586a8238d63560baf/src/mongo/db/logical_session_cache.h#L71-L75) * [The logical session cache refresh function](https://github.com/mongodb/mongo/blob/1f94484d52064e12baedc7b586a8238d63560baf/src/mongo/db/logical_session_cache_impl.cpp#L207-L355) * [The periodic job to clean up the session catalog and transactions table (the "reap" function)](https://github.com/mongodb/mongo/blob/1f94484d52064e12baedc7b586a8238d63560baf/src/mongo/db/logical_session_cache_impl.cpp#L141-L205) -* [Location of the session catalog and transactions table cleanup code on mongod](https://github.com/mongodb/mongo/blob/1f94484d52064e12baedc7b586a8238d63560baf/src/mongo/db/session_catalog_mongod.cpp#L331-L398) +* [Location of the session catalog and transactions table cleanup code on mongod](https://github.com/mongodb/mongo/blob/1f94484d52064e12baedc7b586a8238d63560baf/src/mongo/db/session/session_catalog_mongod.cpp#L331-L398) ## The logical session catalog @@ -856,7 +856,7 @@ or yield the session. Checking out an internal/child session additionally checks out its parent session (the session with the same `id` and `uid` value in the lsid, but without a `txnNumber` or `txnUUID` value), and vice versa. The runtime state for a session consists of the last checkout time and operation, the number of operations -waiting to check out the session, and the number of kills requested. Retryable internal sessions are reaped from the logical session catalog [eagerly](https://github.com/mongodb/mongo/blob/67e37f8e806a6a5d402e20eee4b3097e2b11f820/src/mongo/db/session_catalog.cpp#L342), meaning that if a transaction session with a higher transaction number has successfully started, sessions with lower txnNumbers are removed from the session catalog and inserted into an in-memory buffer by the [InternalTransactionsReapService](https://github.com/mongodb/mongo/blob/67e37f8e806a6a5d402e20eee4b3097e2b11f820/src/mongo/db/internal_transactions_reap_service.h#L42) until a configurable threshold is met (1000 by default), after which they are deleted from the transactions table (`config.transactions`) and `config.image_collection` all at once. Eager reaping is best-effort, in that the in-memory buffer is cleared on stepdown or restart. +waiting to check out the session, and the number of kills requested. Retryable internal sessions are reaped from the logical session catalog [eagerly](https://github.com/mongodb/mongo/blob/67e37f8e806a6a5d402e20eee4b3097e2b11f820/src/mongo/db/session/session_catalog.cpp#L342), meaning that if a transaction session with a higher transaction number has successfully started, sessions with lower txnNumbers are removed from the session catalog and inserted into an in-memory buffer by the [InternalTransactionsReapService](https://github.com/mongodb/mongo/blob/67e37f8e806a6a5d402e20eee4b3097e2b11f820/src/mongo/db/internal_transactions_reap_service.h#L42) until a configurable threshold is met (1000 by default), after which they are deleted from the transactions table (`config.transactions`) and `config.image_collection` all at once. Eager reaping is best-effort, in that the in-memory buffer is cleared on stepdown or restart. The last checkout time is used by the [periodic job inside the logical session cache](#periodic-cleanup-of-the-session-catalog-and-transactions-table) @@ -871,15 +871,15 @@ the first kill request. The runtime state in a node's in-memory session catalog is made durable in the node's `config.transactions` collection, also called its transactions table. The in-memory session catalog is -[invalidated](https://github.com/mongodb/mongo/blob/56655b06ac46825c5937ccca5947dc84ccbca69c/src/mongo/db/session_catalog_mongod.cpp#L324) +[invalidated](https://github.com/mongodb/mongo/blob/56655b06ac46825c5937ccca5947dc84ccbca69c/src/mongo/db/session/session_catalog_mongod.cpp#L324) if the `config.transactions` collection is dropped and whenever there is a rollback. When invalidation occurs, all active sessions are killed, and the in-memory transaction state is marked as invalid to force it to be -[reloaded from storage the next time a session is checked out](https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/session_catalog_mongod.cpp#L426). +[reloaded from storage the next time a session is checked out](https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/session/session_catalog_mongod.cpp#L426). #### Code references -* [**SessionCatalog class**](https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/session_catalog.h) -* [**MongoDSessionCatalog class**](https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/session_catalog_mongod.h) +* [**SessionCatalog class**](https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/session/session_catalog.h) +* [**MongoDSessionCatalog class**](https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/session/session_catalog_mongod.h) * [**RouterSessionCatalog class**](https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/s/session_catalog_router.h) * How [**mongod**](https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/service_entry_point_common.cpp#L537) and [**mongos**](https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/s/commands/strategy.cpp#L412) check out a session prior to executing a command. @@ -1135,7 +1135,7 @@ Currently, a retryable internal transaction can only support a **single** `findA #### Retryability across failover and restart -To be able to guarantee retryability under failover, we need to make sure that a mongod **always** has all the necessary transaction state loaded while executing a retryable write command. To do this, we recover the transaction state of the client and internal sessions [when checking out sessions](https://github.com/mongodb/mongo/blob/master/src/mongo/db/session_catalog_mongod.cpp#L694) on recovery. During checkout, we call [refreshFromStorageIfNeeded()](https://github.com/mongodb/mongo/blob/master/src/mongo/db/transaction_participant.cpp#L2902) on the current client session (if we are running in one) to refresh the TransactionParticipant for that session. We then [fetch any relevant active internal sessions associated with the current client session and refresh the TransactionParticipants for those sessions](https://github.com/mongodb/mongo/blob/master/src/mongo/db/transaction_participant.cpp#L2988). +To be able to guarantee retryability under failover, we need to make sure that a mongod **always** has all the necessary transaction state loaded while executing a retryable write command. To do this, we recover the transaction state of the client and internal sessions [when checking out sessions](https://github.com/mongodb/mongo/blob/master/src/mongo/db/session/session_catalog_mongod.cpp#L694) on recovery. During checkout, we call [refreshFromStorageIfNeeded()](https://github.com/mongodb/mongo/blob/master/src/mongo/db/transaction_participant.cpp#L2902) on the current client session (if we are running in one) to refresh the TransactionParticipant for that session. We then [fetch any relevant active internal sessions associated with the current client session and refresh the TransactionParticipants for those sessions](https://github.com/mongodb/mongo/blob/master/src/mongo/db/transaction_participant.cpp#L2988). #### Handling retry conflicts @@ -1161,7 +1161,7 @@ For resharding, the process is similar to how chunk migrations are handled. The #### Code References -* [**Session checkout logic**](https://github.com/mongodb/mongo/blob/master/src/mongo/db/session_catalog_mongod.cpp#L694) +* [**Session checkout logic**](https://github.com/mongodb/mongo/blob/master/src/mongo/db/session/session_catalog_mongod.cpp#L694) * [**Cross-section history check logic**](https://github.com/mongodb/mongo/blob/master/src/mongo/db/transaction_participant.cpp#L3206) * [**Conflicting internal transaction check logic**](https://github.com/mongodb/mongo/blob/master/src/mongo/db/transaction_participant.cpp#L2814-L2868) * [**Refreshing client and internal sessions logic**](https://github.com/mongodb/mongo/blob/master/src/mongo/db/transaction_participant.cpp#L2923-L2986) diff --git a/src/mongo/db/s/SConscript b/src/mongo/db/s/SConscript index 0fa209c2340..3b47936f456 100644 --- a/src/mongo/db/s/SConscript +++ b/src/mongo/db/s/SConscript @@ -190,7 +190,7 @@ env.Library( '$BUILD_DIR/mongo/db/ops/write_ops', '$BUILD_DIR/mongo/db/repl/image_collection_entry', '$BUILD_DIR/mongo/db/rs_local_client', - '$BUILD_DIR/mongo/db/session_catalog', + '$BUILD_DIR/mongo/db/session/session_catalog', '$BUILD_DIR/mongo/db/timeseries/bucket_catalog', '$BUILD_DIR/mongo/idl/server_parameter', '$BUILD_DIR/mongo/util/future_util', @@ -652,7 +652,6 @@ env.CppUnitTest( '$BUILD_DIR/mongo/db/commands/server_status', '$BUILD_DIR/mongo/db/exec/document_value/document_value_test_util', '$BUILD_DIR/mongo/db/keys_collection_client_direct', - '$BUILD_DIR/mongo/db/logical_session_cache_impl', '$BUILD_DIR/mongo/db/op_observer/op_observer', '$BUILD_DIR/mongo/db/op_observer/op_observer_util', '$BUILD_DIR/mongo/db/op_observer/oplog_writer_impl', @@ -670,6 +669,7 @@ env.CppUnitTest( '$BUILD_DIR/mongo/db/repl/replmocks', '$BUILD_DIR/mongo/db/repl/storage_interface_impl', '$BUILD_DIR/mongo/db/repl/wait_for_majority_service', + '$BUILD_DIR/mongo/db/session/logical_session_cache_impl', '$BUILD_DIR/mongo/db/timeseries/timeseries_options', '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture', '$BUILD_DIR/mongo/s/catalog/sharding_catalog_client_mock', diff --git a/src/mongo/db/s/config/configsvr_coordinator.h b/src/mongo/db/s/config/configsvr_coordinator.h index eb26dba7d22..aa48a2477c4 100644 --- a/src/mongo/db/s/config/configsvr_coordinator.h +++ b/src/mongo/db/s/config/configsvr_coordinator.h @@ -29,10 +29,10 @@ #pragma once -#include "mongo/db/internal_session_pool.h" #include "mongo/db/persistent_task_store.h" #include "mongo/db/repl/primary_only_service.h" #include "mongo/db/s/config/set_user_write_block_mode_coordinator_document_gen.h" +#include "mongo/db/session/internal_session_pool.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_coordinator.idl b/src/mongo/db/s/config/configsvr_coordinator.idl index b97e29fe6a4..8727d749058 100644 --- a/src/mongo/db/s/config/configsvr_coordinator.idl +++ b/src/mongo/db/s/config/configsvr_coordinator.idl @@ -31,7 +31,7 @@ global: cpp_namespace: "mongo" imports: - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/idl/basic_types.idl" enums: 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 5f69b19808d..c54390d759a 100644 --- a/src/mongo/db/s/config/configsvr_remove_chunks_command.cpp +++ b/src/mongo/db/s/config/configsvr_remove_chunks_command.cpp @@ -36,7 +36,7 @@ #include "mongo/db/dbdirectclient.h" #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/session/session_catalog_mongod.h" #include "mongo/db/transaction/transaction_participant.h" #include "mongo/s/catalog/sharding_catalog_client.h" #include "mongo/s/catalog/type_chunk.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 918e7b92348..90b2317c001 100644 --- a/src/mongo/db/s/config/configsvr_remove_tags_command.cpp +++ b/src/mongo/db/s/config/configsvr_remove_tags_command.cpp @@ -36,7 +36,7 @@ #include "mongo/db/dbdirectclient.h" #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/session/session_catalog_mongod.h" #include "mongo/db/transaction/transaction_participant.h" #include "mongo/s/catalog/sharding_catalog_client.h" #include "mongo/s/catalog/type_tags.h" diff --git a/src/mongo/db/s/config/set_cluster_parameter_coordinator.h b/src/mongo/db/s/config/set_cluster_parameter_coordinator.h index 167898c2ecd..00ef0344f5c 100644 --- a/src/mongo/db/s/config/set_cluster_parameter_coordinator.h +++ b/src/mongo/db/s/config/set_cluster_parameter_coordinator.h @@ -29,9 +29,9 @@ #pragma once -#include "mongo/db/internal_session_pool.h" #include "mongo/db/s/config/configsvr_coordinator.h" #include "mongo/db/s/config/set_cluster_parameter_coordinator_document_gen.h" +#include "mongo/db/session/internal_session_pool.h" namespace mongo { diff --git a/src/mongo/db/s/config/set_user_write_block_mode_coordinator.h b/src/mongo/db/s/config/set_user_write_block_mode_coordinator.h index 8ac13d5aca6..c118114c476 100644 --- a/src/mongo/db/s/config/set_user_write_block_mode_coordinator.h +++ b/src/mongo/db/s/config/set_user_write_block_mode_coordinator.h @@ -29,9 +29,9 @@ #pragma once -#include "mongo/db/internal_session_pool.h" #include "mongo/db/s/config/configsvr_coordinator.h" #include "mongo/db/s/config/set_user_write_block_mode_coordinator_document_gen.h" +#include "mongo/db/session/internal_session_pool.h" namespace mongo { diff --git a/src/mongo/db/s/config/sharding_catalog_manager.h b/src/mongo/db/s/config/sharding_catalog_manager.h index 7310fe98c08..86ac24fa736 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager.h +++ b/src/mongo/db/s/config/sharding_catalog_manager.h @@ -33,9 +33,9 @@ #include "mongo/bson/bsonobj.h" #include "mongo/db/auth/authorization_session.h" #include "mongo/db/concurrency/d_concurrency.h" -#include "mongo/db/logical_session_cache.h" #include "mongo/db/operation_context.h" #include "mongo/db/repl/optime_with.h" +#include "mongo/db/session/logical_session_cache.h" #include "mongo/db/transaction/transaction_api.h" #include "mongo/executor/task_executor.h" #include "mongo/platform/mutex.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 97f8ced0db6..073574a7bd8 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 @@ -29,12 +29,12 @@ #include "mongo/db/concurrency/exception_util.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/repl/wait_for_majority_service.h" #include "mongo/db/s/config/config_server_test_fixture.h" #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/session/logical_session_cache_noop.h" +#include "mongo/db/session/session_catalog_mongod.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 a7461607eed..b7ceee4717f 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 @@ -36,7 +36,6 @@ #include "mongo/client/read_preference.h" #include "mongo/db/catalog_raii.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_cache.h" #include "mongo/db/namespace_string.h" #include "mongo/db/operation_context.h" #include "mongo/db/query/distinct_command_gen.h" @@ -44,6 +43,7 @@ #include "mongo/db/s/sharding_logging.h" #include "mongo/db/s/sharding_util.h" #include "mongo/db/server_options.h" +#include "mongo/db/session/logical_session_cache.h" #include "mongo/db/snapshot_window_options_gen.h" #include "mongo/db/transaction/transaction_api.h" #include "mongo/db/transaction/transaction_participant_gen.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 5ee5f2dccce..5624b5dec37 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 @@ -49,7 +49,6 @@ #include "mongo/db/commands.h" #include "mongo/db/commands/feature_compatibility_version.h" #include "mongo/db/internal_transactions_feature_flag_gen.h" -#include "mongo/db/logical_session_cache.h" #include "mongo/db/namespace_string.h" #include "mongo/db/operation_context.h" #include "mongo/db/query/collation/collator_factory_interface.h" @@ -58,6 +57,7 @@ #include "mongo/db/s/sharding_ddl_util.h" #include "mongo/db/s/sharding_logging.h" #include "mongo/db/s/sharding_util.h" +#include "mongo/db/session/logical_session_cache.h" #include "mongo/db/timeseries/timeseries_options.h" #include "mongo/db/transaction/transaction_api.h" #include "mongo/db/vector_clock.h" diff --git a/src/mongo/db/s/config/sharding_catalog_manager_commit_chunk_migration_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_commit_chunk_migration_test.cpp index fc8a55a9635..0f99ae11634 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_commit_chunk_migration_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_commit_chunk_migration_test.cpp @@ -31,7 +31,6 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/client/read_preference.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/namespace_string.h" #include "mongo/db/read_write_concern_defaults.h" #include "mongo/db/read_write_concern_defaults_cache_lookup_mock.h" @@ -39,7 +38,8 @@ #include "mongo/db/s/config/config_server_test_fixture.h" #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/session/logical_session_cache_noop.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/logv2/log.h" #include "mongo/s/catalog/type_chunk.h" #include "mongo/s/catalog/type_shard.h" diff --git a/src/mongo/db/s/config/sharding_catalog_manager_merge_chunks_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_merge_chunks_test.cpp index 9d7e68c9a93..39837c1aadd 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_merge_chunks_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_merge_chunks_test.cpp @@ -29,12 +29,12 @@ #include "mongo/client/read_preference.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/namespace_string.h" #include "mongo/db/s/config/config_server_test_fixture.h" #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/session/logical_session_cache_noop.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/s/catalog/sharding_catalog_client.h" #include "mongo/s/catalog/type_chunk.h" diff --git a/src/mongo/db/s/config/sharding_catalog_manager_remove_shard_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_remove_shard_test.cpp index 7e191f0525a..8ac1e44b7bf 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_remove_shard_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_remove_shard_test.cpp @@ -33,14 +33,14 @@ #include "mongo/client/remote_command_targeter_mock.h" #include "mongo/db/commands.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/ops/write_ops.h" #include "mongo/db/read_write_concern_defaults.h" #include "mongo/db/read_write_concern_defaults_cache_lookup_mock.h" #include "mongo/db/s/config/config_server_test_fixture.h" #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/session/logical_session_cache_noop.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/executor/task_executor.h" #include "mongo/rpc/metadata/repl_set_metadata.h" #include "mongo/rpc/metadata/tracking_metadata.h" diff --git a/src/mongo/db/s/config/sharding_catalog_manager_split_chunk_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_split_chunk_test.cpp index 9b9e48cfe0b..32c5ced57b4 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_split_chunk_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_split_chunk_test.cpp @@ -29,12 +29,12 @@ #include "mongo/client/read_preference.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/namespace_string.h" #include "mongo/db/s/config/config_server_test_fixture.h" #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/session/logical_session_cache_noop.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/s/catalog/type_chunk.h" namespace mongo { diff --git a/src/mongo/db/s/global_index/global_index_inserter_test.cpp b/src/mongo/db/s/global_index/global_index_inserter_test.cpp index 19cee9abefc..2b38bd9d674 100644 --- a/src/mongo/db/s/global_index/global_index_inserter_test.cpp +++ b/src/mongo/db/s/global_index/global_index_inserter_test.cpp @@ -31,12 +31,12 @@ #include "mongo/db/auth/authorization_session.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/repl/replication_coordinator_mock.h" #include "mongo/db/s/global_index/global_index_entry_gen.h" #include "mongo/db/s/shard_server_test_fixture.h" #include "mongo/db/s/transaction_coordinator_service.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/logical_session_cache_noop.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/executor/network_interface_factory.h" #include "mongo/executor/thread_pool_task_executor.h" #include "mongo/logv2/log.h" diff --git a/src/mongo/db/s/migration_chunk_cloner_source.h b/src/mongo/db/s/migration_chunk_cloner_source.h index 61bc3106412..7f535f270af 100644 --- a/src/mongo/db/s/migration_chunk_cloner_source.h +++ b/src/mongo/db/s/migration_chunk_cloner_source.h @@ -29,7 +29,7 @@ #pragma once -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy_test.cpp b/src/mongo/db/s/migration_chunk_cloner_source_legacy_test.cpp index b5046b97d86..e09ba6b8fd7 100644 --- a/src/mongo/db/s/migration_chunk_cloner_source_legacy_test.cpp +++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy_test.cpp @@ -33,13 +33,13 @@ #include "mongo/db/catalog/create_collection.h" #include "mongo/db/catalog_raii.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/namespace_string.h" #include "mongo/db/s/collection_sharding_runtime.h" #include "mongo/db/s/migration_chunk_cloner_source_legacy.h" #include "mongo/db/s/operation_sharding_state.h" #include "mongo/db/s/shard_server_test_fixture.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/logical_session_id_helpers.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/s/catalog/sharding_catalog_client_mock.h" #include "mongo/s/catalog/type_shard.h" #include "mongo/s/client/shard_registry.h" diff --git a/src/mongo/db/s/migration_coordinator.cpp b/src/mongo/db/s/migration_coordinator.cpp index 8cfede2c21b..ff4372f97ba 100644 --- a/src/mongo/db/s/migration_coordinator.cpp +++ b/src/mongo/db/s/migration_coordinator.cpp @@ -32,9 +32,9 @@ #include "mongo/db/s/migration_coordinator.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/s/migration_util.h" #include "mongo/db/s/range_deletion_task_gen.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/db/vector_clock.h" #include "mongo/logv2/log.h" #include "mongo/platform/atomic_word.h" diff --git a/src/mongo/db/s/migration_coordinator.h b/src/mongo/db/s/migration_coordinator.h index f758bddb2cc..acde3c6e012 100644 --- a/src/mongo/db/s/migration_coordinator.h +++ b/src/mongo/db/s/migration_coordinator.h @@ -29,8 +29,8 @@ #pragma once -#include "mongo/db/logical_session_id.h" #include "mongo/db/s/migration_coordinator_document_gen.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/s/catalog/type_chunk.h" namespace mongo { diff --git a/src/mongo/db/s/migration_coordinator_document.idl b/src/mongo/db/s/migration_coordinator_document.idl index c9368dcedaa..af557b55e71 100644 --- a/src/mongo/db/s/migration_coordinator_document.idl +++ b/src/mongo/db/s/migration_coordinator_document.idl @@ -39,7 +39,7 @@ imports: - "mongo/s/sharding_types.idl" - "mongo/s/chunk_range.idl" - "mongo/s/chunk_version.idl" - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" enums: Decision: diff --git a/src/mongo/db/s/migration_destination_manager.cpp b/src/mongo/db/s/migration_destination_manager.cpp index a4f64ff996e..06e18bb37df 100644 --- a/src/mongo/db/s/migration_destination_manager.cpp +++ b/src/mongo/db/s/migration_destination_manager.cpp @@ -43,7 +43,6 @@ #include "mongo/db/dbhelpers.h" #include "mongo/db/index/index_descriptor.h" #include "mongo/db/index_builds_coordinator.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/namespace_string.h" #include "mongo/db/op_observer/op_observer.h" #include "mongo/db/operation_context.h" @@ -66,7 +65,8 @@ #include "mongo/db/s/start_chunk_clone_request.h" #include "mongo/db/server_options.h" #include "mongo/db/service_context.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/logical_session_id_helpers.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/storage/remove_saver.h" #include "mongo/db/transaction/transaction_participant.h" #include "mongo/db/vector_clock.h" diff --git a/src/mongo/db/s/migration_source_manager.cpp b/src/mongo/db/s/migration_source_manager.cpp index 61cb3b85af7..164af14539b 100644 --- a/src/mongo/db/s/migration_source_manager.cpp +++ b/src/mongo/db/s/migration_source_manager.cpp @@ -32,8 +32,6 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/db/catalog_raii.h" -#include "mongo/db/logical_session_cache.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/op_observer/op_observer.h" #include "mongo/db/operation_context.h" #include "mongo/db/read_concern.h" @@ -52,6 +50,8 @@ #include "mongo/db/s/sharding_state_recovery.h" #include "mongo/db/s/sharding_statistics.h" #include "mongo/db/s/type_shard_collection.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/db/timeseries/bucket_catalog.h" #include "mongo/db/vector_clock.h" #include "mongo/executor/task_executor.h" diff --git a/src/mongo/db/s/migration_util.cpp b/src/mongo/db/s/migration_util.cpp index ff30fac2265..990f07fea47 100644 --- a/src/mongo/db/s/migration_util.cpp +++ b/src/mongo/db/s/migration_util.cpp @@ -42,7 +42,6 @@ #include "mongo/db/commands.h" #include "mongo/db/concurrency/exception_util.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_cache.h" #include "mongo/db/namespace_string.h" #include "mongo/db/op_observer/op_observer.h" #include "mongo/db/ops/write_ops.h" @@ -59,6 +58,7 @@ #include "mongo/db/s/sharding_runtime_d_params_gen.h" #include "mongo/db/s/sharding_state.h" #include "mongo/db/s/sharding_statistics.h" +#include "mongo/db/session/logical_session_cache.h" #include "mongo/db/vector_clock.h" #include "mongo/db/vector_clock_mutable.h" #include "mongo/db/write_concern.h" diff --git a/src/mongo/db/s/range_deletion_task.idl b/src/mongo/db/s/range_deletion_task.idl index 7d2b90610b9..9e6e0da71b5 100644 --- a/src/mongo/db/s/range_deletion_task.idl +++ b/src/mongo/db/s/range_deletion_task.idl @@ -35,7 +35,7 @@ global: imports: - "mongo/idl/basic_types.idl" - "mongo/s/sharding_types.idl" - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/s/chunk_range.idl" enums: diff --git a/src/mongo/db/s/resharding/resharding_collection_cloner.cpp b/src/mongo/db/s/resharding/resharding_collection_cloner.cpp index d72826aabb4..54381a5f6c0 100644 --- a/src/mongo/db/s/resharding/resharding_collection_cloner.cpp +++ b/src/mongo/db/s/resharding/resharding_collection_cloner.cpp @@ -40,7 +40,6 @@ #include "mongo/db/client.h" #include "mongo/db/curop.h" #include "mongo/db/exec/document_value/document.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/pipeline/aggregation_request_helper.h" #include "mongo/db/pipeline/document_source_match.h" #include "mongo/db/pipeline/document_source_replace_root.h" @@ -54,6 +53,7 @@ #include "mongo/db/s/resharding/resharding_server_parameters_gen.h" #include "mongo/db/s/resharding/resharding_util.h" #include "mongo/db/service_context.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/db/storage/write_unit_of_work.h" #include "mongo/executor/task_executor.h" #include "mongo/logv2/log.h" diff --git a/src/mongo/db/s/resharding/resharding_coordinator_service.cpp b/src/mongo/db/s/resharding/resharding_coordinator_service.cpp index 270c6c91198..55d1ced54d8 100644 --- a/src/mongo/db/s/resharding/resharding_coordinator_service.cpp +++ b/src/mongo/db/s/resharding/resharding_coordinator_service.cpp @@ -34,7 +34,6 @@ #include "mongo/bson/json.h" #include "mongo/db/auth/authorization_session_impl.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_cache.h" #include "mongo/db/ops/write_ops.h" #include "mongo/db/repl/primary_only_service.h" #include "mongo/db/repl/repl_client_info.h" @@ -51,6 +50,7 @@ #include "mongo/db/s/sharding_data_transform_metrics.h" #include "mongo/db/s/sharding_ddl_util.h" #include "mongo/db/s/sharding_logging.h" +#include "mongo/db/session/logical_session_cache.h" #include "mongo/db/storage/duplicate_key_error_info.h" #include "mongo/db/vector_clock.h" #include "mongo/db/write_concern_options.h" diff --git a/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp b/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp index f7e4aaf9f0e..e342747e266 100644 --- a/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp +++ b/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp @@ -31,7 +31,6 @@ #include <functional> #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/op_observer/op_observer_impl.h" #include "mongo/db/op_observer/op_observer_noop.h" #include "mongo/db/op_observer/op_observer_registry.h" @@ -45,7 +44,8 @@ #include "mongo/db/s/resharding/resharding_util.h" #include "mongo/db/s/transaction_coordinator_service.h" #include "mongo/db/service_context.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/logical_session_cache_noop.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/idl/server_parameter_test_util.h" #include "mongo/logv2/log.h" #include "mongo/s/catalog/type_collection.h" diff --git a/src/mongo/db/s/resharding/resharding_coordinator_test.cpp b/src/mongo/db/s/resharding/resharding_coordinator_test.cpp index bd6919f02af..80fd3970a61 100644 --- a/src/mongo/db/s/resharding/resharding_coordinator_test.cpp +++ b/src/mongo/db/s/resharding/resharding_coordinator_test.cpp @@ -31,7 +31,6 @@ #include "mongo/client/remote_command_targeter_mock.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/repl/storage_interface_impl.h" #include "mongo/db/repl/storage_interface_mock.h" #include "mongo/db/s/config/config_server_test_fixture.h" @@ -40,7 +39,8 @@ #include "mongo/db/s/resharding/resharding_coordinator_service.h" #include "mongo/db/s/resharding/resharding_util.h" #include "mongo/db/s/transaction_coordinator_service.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/logical_session_cache_noop.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/logv2/log.h" #include "mongo/s/catalog/type_collection.h" #include "mongo/s/catalog/type_shard.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 7126e13a091..876e2338bdf 100644 --- a/src/mongo/db/s/resharding/resharding_data_copy_util.cpp +++ b/src/mongo/db/s/resharding/resharding_data_copy_util.cpp @@ -43,9 +43,9 @@ #include "mongo/db/s/resharding/resharding_txn_cloner_progress_gen.h" #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/session_catalog_mongod.h" +#include "mongo/db/session/session_txn_record_gen.h" #include "mongo/db/storage/write_unit_of_work.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_data_copy_util.h b/src/mongo/db/s/resharding/resharding_data_copy_util.h index 9f2a332ef6c..807ddaf6bfc 100644 --- a/src/mongo/db/s/resharding/resharding_data_copy_util.h +++ b/src/mongo/db/s/resharding/resharding_data_copy_util.h @@ -36,9 +36,9 @@ #include "mongo/db/catalog/collection_catalog.h" #include "mongo/db/exec/document_value/document.h" #include "mongo/db/exec/document_value/value.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/repl/oplog.h" #include "mongo/db/s/shard_filtering_metadata_refresh.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/s/resharding/common_types_gen.h" #include "mongo/util/functional.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 fbaa3ddedc8..51300394adc 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/shard_server_test_fixture.h" #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/session/session_catalog_mongod.h" #include "mongo/db/transaction/transaction_participant.h" #include "mongo/s/catalog/sharding_catalog_client_mock.h" #include "mongo/s/catalog/type_shard.h" diff --git a/src/mongo/db/s/resharding/resharding_oplog_application.cpp b/src/mongo/db/s/resharding/resharding_oplog_application.cpp index ae4bc5f3d4e..98eaa15b83c 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_application.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_application.cpp @@ -33,7 +33,6 @@ #include "mongo/db/concurrency/exception_util.h" #include "mongo/db/dbhelpers.h" #include "mongo/db/index/index_access_method.h" -#include "mongo/db/logical_session_cache.h" #include "mongo/db/namespace_string.h" #include "mongo/db/ops/delete.h" #include "mongo/db/ops/delete_request_gen.h" @@ -44,7 +43,8 @@ #include "mongo/db/repl/oplog_applier_utils.h" #include "mongo/db/s/operation_sharding_state.h" #include "mongo/db/s/resharding/resharding_server_parameters_gen.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/stats/counters.h" #include "mongo/db/transaction/transaction_participant.h" #include "mongo/logv2/log.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 12c1d94c323..620ccd969d5 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_applier_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_applier_test.cpp @@ -34,7 +34,6 @@ #include "mongo/db/catalog_raii.h" #include "mongo/db/db_raii.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/repl/oplog_applier.h" #include "mongo/db/repl/session_update_tracker.h" #include "mongo/db/repl/storage_interface_impl.h" @@ -46,7 +45,8 @@ #include "mongo/db/s/resharding/resharding_util.h" #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/session/logical_session_cache_noop.h" +#include "mongo/db/session/session_catalog_mongod.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" 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 963240e224f..f15f09b8031 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 @@ -33,8 +33,6 @@ #include "mongo/bson/bsonmisc.h" #include "mongo/db/catalog/collection_options.h" #include "mongo/db/catalog_raii.h" -#include "mongo/db/logical_session_cache_noop.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/op_observer/op_observer_registry.h" #include "mongo/db/op_observer/oplog_writer_impl.h" #include "mongo/db/persistent_task_store.h" @@ -49,7 +47,9 @@ #include "mongo/db/s/resharding/resharding_oplog_session_application.h" #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/session/logical_session_cache_noop.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/transaction/transaction_participant.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_preparer.cpp b/src/mongo/db/s/resharding/resharding_oplog_batch_preparer.cpp index 8f9afdce99c..ca382ace57c 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_batch_preparer.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_batch_preparer.cpp @@ -34,11 +34,11 @@ #include <third_party/murmurhash3/MurmurHash3.h> #include "mongo/bson/bsonelement_comparator.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/ops/write_ops_retryability.h" #include "mongo/db/query/collation/collator_interface.h" #include "mongo/db/repl/apply_ops.h" #include "mongo/db/s/resharding/resharding_server_parameters_gen.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/logv2/redaction.h" #include "mongo/util/assert_util.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/s/resharding/resharding_oplog_batch_preparer_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_batch_preparer_test.cpp index de77aa2af55..2b42c344a2e 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_batch_preparer_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_batch_preparer_test.cpp @@ -29,11 +29,11 @@ #include "mongo/platform/basic.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/ops/write_ops_retryability.h" #include "mongo/db/query/collation/collator_interface.h" #include "mongo/db/s/resharding/resharding_oplog_batch_preparer.h" #include "mongo/db/s/resharding/resharding_server_parameters_gen.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/idl/server_parameter_test_util.h" #include "mongo/unittest/unittest.h" diff --git a/src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp index 437540edb76..43968dd99d5 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp @@ -31,7 +31,6 @@ #include "mongo/db/catalog/collection_options.h" #include "mongo/db/catalog/collection_write_path.h" #include "mongo/db/catalog_raii.h" -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/op_observer/op_observer_registry.h" #include "mongo/db/op_observer/oplog_writer_impl.h" #include "mongo/db/persistent_task_store.h" @@ -48,7 +47,8 @@ #include "mongo/db/s/resharding/resharding_util.h" #include "mongo/db/s/sharding_state.h" #include "mongo/db/service_context_d_test_fixture.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/logical_session_cache_noop.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/update/update_oplog_entry_serialization.h" #include "mongo/s/catalog/type_chunk.h" #include "mongo/s/chunk_manager.h" diff --git a/src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp index d56ec50531d..85116d5cf4e 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp @@ -37,7 +37,6 @@ #include "mongo/db/db_raii.h" #include "mongo/db/dbdirectclient.h" #include "mongo/db/dbhelpers.h" -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/op_observer/op_observer_impl.h" #include "mongo/db/pipeline/document_source_mock.h" #include "mongo/db/repl/storage_interface_impl.h" @@ -48,7 +47,8 @@ #include "mongo/db/s/resharding/resharding_util.h" #include "mongo/db/s/shard_server_test_fixture.h" #include "mongo/db/service_context.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/logical_session_cache_noop.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/storage/write_unit_of_work.h" #include "mongo/s/catalog/sharding_catalog_client_mock.h" #include "mongo/s/catalog/type_shard.h" 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 4093e8b6176..c2f15a0b507 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 @@ -34,8 +34,6 @@ #include "mongo/db/catalog_raii.h" #include "mongo/db/exec/document_value/document.h" -#include "mongo/db/logical_session_id.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/persistent_task_store.h" #include "mongo/db/repl/replication_coordinator_mock.h" #include "mongo/db/repl/session_update_tracker.h" @@ -43,7 +41,9 @@ #include "mongo/db/s/resharding/donor_oplog_id_gen.h" #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/session/logical_session_id.h" +#include "mongo/db/session/logical_session_id_helpers.h" +#include "mongo/db/session/session_catalog_mongod.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_recipient_service_external_state_test.cpp b/src/mongo/db/s/resharding/resharding_recipient_service_external_state_test.cpp index 62776bba466..33bab5f9491 100644 --- a/src/mongo/db/s/resharding/resharding_recipient_service_external_state_test.cpp +++ b/src/mongo/db/s/resharding/resharding_recipient_service_external_state_test.cpp @@ -39,7 +39,7 @@ #include "mongo/db/s/resharding/resharding_recipient_service_external_state.h" #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/session/session_catalog_mongod.h" #include "mongo/logv2/log.h" #include "mongo/s/catalog_cache_test_fixture.h" #include "mongo/s/database_version.h" diff --git a/src/mongo/db/s/resharding/resharding_txn_cloner.cpp b/src/mongo/db/s/resharding/resharding_txn_cloner.cpp index e8f98fb3619..8a015e52af5 100644 --- a/src/mongo/db/s/resharding/resharding_txn_cloner.cpp +++ b/src/mongo/db/s/resharding/resharding_txn_cloner.cpp @@ -39,7 +39,6 @@ #include "mongo/db/client.h" #include "mongo/db/concurrency/d_concurrency.h" #include "mongo/db/curop.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/namespace_string.h" #include "mongo/db/operation_context.h" #include "mongo/db/persistent_task_store.h" @@ -55,8 +54,9 @@ #include "mongo/db/s/resharding/resharding_server_parameters_gen.h" #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/transaction/session_txn_record_gen.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/session_catalog_mongod.h" +#include "mongo/db/session/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 2653ba9fc0a..17a0f7573d1 100644 --- a/src/mongo/db/s/resharding/resharding_txn_cloner.h +++ b/src/mongo/db/s/resharding/resharding_txn_cloner.h @@ -34,11 +34,11 @@ #include "mongo/bson/timestamp.h" #include "mongo/db/cancelable_operation_context.h" -#include "mongo/db/logical_session_id_gen.h" #include "mongo/db/pipeline/expression_context.h" #include "mongo/db/pipeline/pipeline.h" #include "mongo/db/service_context.h" -#include "mongo/db/transaction/session_txn_record_gen.h" +#include "mongo/db/session/logical_session_id_gen.h" +#include "mongo/db/session/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_progress.idl b/src/mongo/db/s/resharding/resharding_txn_cloner_progress.idl index 640dda5f651..d9a7604c283 100644 --- a/src/mongo/db/s/resharding/resharding_txn_cloner_progress.idl +++ b/src/mongo/db/s/resharding/resharding_txn_cloner_progress.idl @@ -33,7 +33,7 @@ global: cpp_namespace: "mongo" imports: - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/idl/basic_types.idl" - "mongo/s/resharding/common_types.idl" - "mongo/s/sharding_types.idl" 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 ee0c6c00b83..8f2ad7c64ef 100644 --- a/src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp +++ b/src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp @@ -35,7 +35,6 @@ #include "mongo/db/auth/authorization_session.h" #include "mongo/db/cancelable_operation_context.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/persistent_task_store.h" #include "mongo/db/pipeline/process_interface/shardsvr_process_interface.h" #include "mongo/db/repl/storage_interface_impl.h" @@ -45,8 +44,9 @@ #include "mongo/db/s/resharding/resharding_txn_cloner_progress_gen.h" #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/transaction/session_txn_record_gen.h" +#include "mongo/db/session/logical_session_cache_noop.h" +#include "mongo/db/session/session_catalog_mongod.h" +#include "mongo/db/session/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" diff --git a/src/mongo/db/s/resharding/resharding_util_test.cpp b/src/mongo/db/s/resharding/resharding_util_test.cpp index 69daa55bd00..82e8180027e 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/transaction/session_txn_record_gen.h" +#include "mongo/db/session/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 f9a56c3e2e5..b6c0db1c0ca 100644 --- a/src/mongo/db/s/session_catalog_migration_destination.cpp +++ b/src/mongo/db/s/session_catalog_migration_destination.cpp @@ -39,13 +39,13 @@ #include "mongo/db/cancelable_operation_context.h" #include "mongo/db/concurrency/d_concurrency.h" #include "mongo/db/concurrency/exception_util.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/ops/write_ops_retryability.h" #include "mongo/db/repl/oplog.h" #include "mongo/db/repl/oplog_entry.h" #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/session/logical_session_id.h" +#include "mongo/db/session/session_catalog_mongod.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/session_catalog_migration_destination_test.cpp b/src/mongo/db/s/session_catalog_migration_destination_test.cpp index cd7ad89f176..160fa63bd0d 100644 --- a/src/mongo/db/s/session_catalog_migration_destination_test.cpp +++ b/src/mongo/db/s/session_catalog_migration_destination_test.cpp @@ -36,9 +36,6 @@ #include "mongo/db/concurrency/d_concurrency.h" #include "mongo/db/db_raii.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/initialize_operation_session_info.h" -#include "mongo/db/logical_session_cache_noop.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/ops/write_ops_exec.h" #include "mongo/db/ops/write_ops_gen.h" #include "mongo/db/repl/oplog_entry.h" @@ -49,8 +46,11 @@ #include "mongo/db/s/session_catalog_migration_destination.h" #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/transaction/session_txn_record_gen.h" +#include "mongo/db/session/initialize_operation_session_info.h" +#include "mongo/db/session/logical_session_cache_noop.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/session_catalog_mongod.h" +#include "mongo/db/session/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" diff --git a/src/mongo/db/s/session_catalog_migration_source.cpp b/src/mongo/db/s/session_catalog_migration_source.cpp index a564e5fd649..f99b10a1e0c 100644 --- a/src/mongo/db/s/session_catalog_migration_source.cpp +++ b/src/mongo/db/s/session_catalog_migration_source.cpp @@ -45,8 +45,8 @@ #include "mongo/db/repl/repl_client_info.h" #include "mongo/db/repl/replication_process.h" #include "mongo/db/s/session_catalog_migration.h" -#include "mongo/db/session.h" -#include "mongo/db/transaction/session_txn_record_gen.h" +#include "mongo/db/session/session.h" +#include "mongo/db/session/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" diff --git a/src/mongo/db/s/session_catalog_migration_source.h b/src/mongo/db/s/session_catalog_migration_source.h index 37e61b6916a..503b718eeaa 100644 --- a/src/mongo/db/s/session_catalog_migration_source.h +++ b/src/mongo/db/s/session_catalog_migration_source.h @@ -35,7 +35,7 @@ #include "mongo/client/dbclient_cursor.h" #include "mongo/db/namespace_string.h" #include "mongo/db/repl/optime.h" -#include "mongo/db/transaction/session_txn_record_gen.h" +#include "mongo/db/session/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" 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 be0dbddaf89..8d41585cb5f 100644 --- a/src/mongo/db/s/session_catalog_migration_source_test.cpp +++ b/src/mongo/db/s/session_catalog_migration_source_test.cpp @@ -35,7 +35,6 @@ #include "mongo/bson/bsonobj.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/ops/write_ops_retryability.h" #include "mongo/db/repl/image_collection_entry_gen.h" #include "mongo/db/repl/mock_repl_coord_server_fixture.h" @@ -44,9 +43,10 @@ #include "mongo/db/repl/replication_process.h" #include "mongo/db/s/session_catalog_migration.h" #include "mongo/db/s/session_catalog_migration_source.h" -#include "mongo/db/session.h" -#include "mongo/db/session_catalog_mongod.h" -#include "mongo/db/transaction/session_txn_record_gen.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/session.h" +#include "mongo/db/session/session_catalog_mongod.h" +#include "mongo/db/session/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" diff --git a/src/mongo/db/s/sharding_ddl_coordinator.cpp b/src/mongo/db/s/sharding_ddl_coordinator.cpp index f80127798fb..e3e54bfea6a 100644 --- a/src/mongo/db/s/sharding_ddl_coordinator.cpp +++ b/src/mongo/db/s/sharding_ddl_coordinator.cpp @@ -34,13 +34,13 @@ #include "mongo/db/catalog/catalog_helper.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/repl/repl_client_info.h" #include "mongo/db/s/database_sharding_state.h" #include "mongo/db/s/global_user_write_block_state.h" #include "mongo/db/s/operation_sharding_state.h" #include "mongo/db/s/sharding_ddl_coordinator_gen.h" #include "mongo/db/s/sharding_ddl_util.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/db/vector_clock_mutable.h" #include "mongo/db/write_concern.h" #include "mongo/logv2/log.h" diff --git a/src/mongo/db/s/sharding_ddl_coordinator.h b/src/mongo/db/s/sharding_ddl_coordinator.h index 569a8c2fc87..ecbd0980a41 100644 --- a/src/mongo/db/s/sharding_ddl_coordinator.h +++ b/src/mongo/db/s/sharding_ddl_coordinator.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/db/internal_session_pool.h" #include "mongo/db/namespace_string.h" #include "mongo/db/operation_context.h" #include "mongo/db/persistent_task_store.h" @@ -39,6 +38,7 @@ #include "mongo/db/s/forwardable_operation_metadata.h" #include "mongo/db/s/sharding_ddl_coordinator_gen.h" #include "mongo/db/s/sharding_ddl_coordinator_service.h" +#include "mongo/db/session/internal_session_pool.h" #include "mongo/executor/task_executor.h" #include "mongo/logv2/log.h" #include "mongo/util/future.h" diff --git a/src/mongo/db/s/sharding_ddl_coordinator.idl b/src/mongo/db/s/sharding_ddl_coordinator.idl index e9df9baa315..051ee6405c4 100644 --- a/src/mongo/db/s/sharding_ddl_coordinator.idl +++ b/src/mongo/db/s/sharding_ddl_coordinator.idl @@ -36,7 +36,7 @@ global: imports: - "mongo/idl/basic_types.idl" - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" enums: DDLCoordinatorType: diff --git a/src/mongo/db/s/sharding_ddl_util_test.cpp b/src/mongo/db/s/sharding_ddl_util_test.cpp index 2ff3925c53e..137434dfb59 100644 --- a/src/mongo/db/s/sharding_ddl_util_test.cpp +++ b/src/mongo/db/s/sharding_ddl_util_test.cpp @@ -28,12 +28,12 @@ */ #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/namespace_string.h" #include "mongo/db/s/config/config_server_test_fixture.h" #include "mongo/db/s/sharding_ddl_util.h" #include "mongo/db/s/transaction_coordinator_service.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/logical_session_cache_noop.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/logv2/log.h" #include "mongo/s/catalog/type_chunk.h" #include "mongo/s/catalog/type_collection.h" diff --git a/src/mongo/db/s/shardsvr_index_catalog_test_commands.cpp b/src/mongo/db/s/shardsvr_index_catalog_test_commands.cpp index 189e06b7e80..513bbc1ffa0 100644 --- a/src/mongo/db/s/shardsvr_index_catalog_test_commands.cpp +++ b/src/mongo/db/s/shardsvr_index_catalog_test_commands.cpp @@ -29,10 +29,10 @@ #include "mongo/db/auth/authorization_session.h" #include "mongo/db/commands.h" -#include "mongo/db/internal_session_pool.h" #include "mongo/db/s/sharded_index_catalog_commands_gen.h" #include "mongo/db/s/sharding_index_catalog_util.h" #include "mongo/db/s/sharding_state.h" +#include "mongo/db/session/internal_session_pool.h" #include "mongo/executor/network_interface_factory.h" #include "mongo/executor/network_interface_thread_pool.h" #include "mongo/executor/task_executor.h" diff --git a/src/mongo/db/s/start_chunk_clone_request.h b/src/mongo/db/s/start_chunk_clone_request.h index 555f5fe0c4e..9451541cbc0 100644 --- a/src/mongo/db/s/start_chunk_clone_request.h +++ b/src/mongo/db/s/start_chunk_clone_request.h @@ -32,9 +32,9 @@ #include <string> #include "mongo/client/connection_string.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/namespace_string.h" #include "mongo/db/s/migration_session_id.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/s/request_types/migration_secondary_throttle_options.h" #include "mongo/s/shard_id.h" diff --git a/src/mongo/db/s/start_chunk_clone_request_test.cpp b/src/mongo/db/s/start_chunk_clone_request_test.cpp index f498be0e366..1d8639988c9 100644 --- a/src/mongo/db/s/start_chunk_clone_request_test.cpp +++ b/src/mongo/db/s/start_chunk_clone_request_test.cpp @@ -35,8 +35,8 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/db/client.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/service_context.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/s/shard_id.h" #include "mongo/unittest/unittest.h" diff --git a/src/mongo/db/s/transaction_coordinator_document.idl b/src/mongo/db/s/transaction_coordinator_document.idl index 39f1bd0bef3..b979de97c79 100644 --- a/src/mongo/db/s/transaction_coordinator_document.idl +++ b/src/mongo/db/s/transaction_coordinator_document.idl @@ -33,7 +33,7 @@ global: imports: - "mongo/idl/basic_types.idl" - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/s/sharding_types.idl" types: diff --git a/src/mongo/db/s/transaction_coordinator_factory.h b/src/mongo/db/s/transaction_coordinator_factory.h index aae2240d0a2..e0277632750 100644 --- a/src/mongo/db/s/transaction_coordinator_factory.h +++ b/src/mongo/db/s/transaction_coordinator_factory.h @@ -29,8 +29,8 @@ #pragma once -#include "mongo/db/logical_session_id.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/logical_session_id.h" namespace mongo { 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 c8499db0358..68865c61f30 100644 --- a/src/mongo/db/s/txn_two_phase_commit_cmds.cpp +++ b/src/mongo/db/s/txn_two_phase_commit_cmds.cpp @@ -38,7 +38,7 @@ #include "mongo/db/repl/repl_client_info.h" #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/session/session_catalog_mongod.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_context.h b/src/mongo/db/service_context.h index 7a8ec435a3a..36388e0be20 100644 --- a/src/mongo/db/service_context.h +++ b/src/mongo/db/service_context.h @@ -35,8 +35,8 @@ #include <memory> #include <vector> -#include "mongo/db/logical_session_id.h" #include "mongo/db/operation_id.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/db/storage/storage_change_lock.h" #include "mongo/db/storage/storage_engine.h" #include "mongo/platform/atomic_word.h" diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp index 22f79f800ef..f18254e76c9 100644 --- a/src/mongo/db/service_entry_point_common.cpp +++ b/src/mongo/db/service_entry_point_common.cpp @@ -54,11 +54,8 @@ #include "mongo/db/dbdirectclient.h" #include "mongo/db/error_labels.h" #include "mongo/db/initialize_api_parameters.h" -#include "mongo/db/initialize_operation_session_info.h" #include "mongo/db/introspect.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_id.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/logical_time_validator.h" #include "mongo/db/not_primary_error_tracker.h" #include "mongo/db/ops/write_ops.h" @@ -81,7 +78,10 @@ #include "mongo/db/s/sharding_statistics.h" #include "mongo/db/s/transaction_coordinator_factory.h" #include "mongo/db/service_entry_point_common.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/initialize_operation_session_info.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/logical_session_id_helpers.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/stats/api_version_metrics.h" #include "mongo/db/stats/counters.h" #include "mongo/db/stats/resource_consumption_metrics.h" diff --git a/src/mongo/db/service_liaison.h b/src/mongo/db/service_liaison.h index fced0082bee..79e6b192da2 100644 --- a/src/mongo/db/service_liaison.h +++ b/src/mongo/db/service_liaison.h @@ -31,8 +31,8 @@ #include <functional> -#include "mongo/db/logical_session_id.h" -#include "mongo/db/session_killer.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/session_killer.h" #include "mongo/util/periodic_runner.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/db/service_liaison_mongod.h b/src/mongo/db/service_liaison_mongod.h index 574e5d98ebb..037cae74308 100644 --- a/src/mongo/db/service_liaison_mongod.h +++ b/src/mongo/db/service_liaison_mongod.h @@ -29,9 +29,9 @@ #pragma once -#include "mongo/db/logical_session_id.h" #include "mongo/db/operation_context.h" #include "mongo/db/service_liaison.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/util/hierarchical_acquisition.h" #include "mongo/util/periodic_runner.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/db/service_liaison_mongos.h b/src/mongo/db/service_liaison_mongos.h index 4b9488d2b2d..97281bcf4d0 100644 --- a/src/mongo/db/service_liaison_mongos.h +++ b/src/mongo/db/service_liaison_mongos.h @@ -29,9 +29,9 @@ #pragma once -#include "mongo/db/logical_session_id.h" #include "mongo/db/operation_context.h" #include "mongo/db/service_liaison.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/util/hierarchical_acquisition.h" #include "mongo/util/periodic_runner.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/db/session/SConscript b/src/mongo/db/session/SConscript new file mode 100644 index 00000000000..4e79131041f --- /dev/null +++ b/src/mongo/db/session/SConscript @@ -0,0 +1,179 @@ +# -*- mode: python -*- +Import("env") + +env = env.Clone() + +env.Library( + target='session_catalog', + source=[ + 'session_catalog.cpp', + ], + LIBDEPS=[ + 'kill_sessions', + 'logical_session_id', + 'logical_session_id_helpers', + ], + LIBDEPS_PRIVATE=[ + '$BUILD_DIR/mongo/db/internal_transactions_feature_flag', + '$BUILD_DIR/mongo/db/service_context', + ], +) + +env.Library( + target='logical_session_id', + source=[ + 'logical_session_id.cpp', + 'logical_session_id.idl', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/mongo/crypto/sha256_block', + '$BUILD_DIR/mongo/crypto/sha_block_${MONGO_CRYPTO}', + '$BUILD_DIR/mongo/idl/idl_parser', + '$BUILD_DIR/mongo/idl/server_parameter', + ], +) + +env.Library( + target='logical_session_id_helpers', + source=[ + 'internal_session_pool.cpp', + 'logical_session_id_helpers.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/auth/auth', + '$BUILD_DIR/mongo/db/auth/authprivilege', + 'logical_session_cache', + 'logical_session_id', + ], +) + +env.Library( + target='sessions_collection', + source=[ + 'sessions_collection.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/mongo/client/clientdriver_minimal', + '$BUILD_DIR/mongo/s/write_ops/batch_write_types', + 'logical_session_id', + 'logical_session_id_helpers', + ], + LIBDEPS_PRIVATE=[ + '$BUILD_DIR/mongo/db/index_commands_idl', + ], +) + +env.Library( + target='sessions_collection_mock', + source=[ + 'sessions_collection_mock.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/base', + 'logical_session_id', + 'sessions_collection', + ], +) + +env.Library( + target='sessions_collection_rs', + source=[ + 'sessions_collection_rs.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/mongo/client/authentication', + '$BUILD_DIR/mongo/client/remote_command_targeter', + '$BUILD_DIR/mongo/db/concurrency/lock_manager', + '$BUILD_DIR/mongo/db/dbdirectclient', + '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', + 'sessions_collection', + ], +) + +env.Library( + target='sessions_collection_standalone', + source=[ + 'sessions_collection_standalone.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/mongo/db/dbdirectclient', + 'logical_session_id', + 'sessions_collection', + ], +) + +env.Library( + target='logical_session_cache', + source=[ + 'logical_session_cache.cpp', + 'logical_session_cache_stats.idl', + 'logical_session_cache.idl', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/service_context', + 'logical_session_id', + ], + LIBDEPS_PRIVATE=[ + '$BUILD_DIR/mongo/idl/server_parameter', + ], +) + +env.Library( + target='logical_session_cache_impl', + source=[ + 'initialize_operation_session_info.cpp', + 'logical_session_cache_impl.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/service_liaison', + '$BUILD_DIR/mongo/db/session/kill_sessions', + 'logical_session_cache', + 'logical_session_id', + 'logical_session_id_helpers', + 'sessions_collection', + ], + LIBDEPS_PRIVATE=[ + '$BUILD_DIR/mongo/db/internal_transactions_feature_flag', + '$BUILD_DIR/mongo/db/s/sharding_api_d', + ], +) + +env.Library( + target='kill_sessions', + source=[ + 'kill_sessions.cpp', + 'kill_sessions_common.cpp', + 'session_killer.cpp', + 'kill_sessions.idl', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/base', + ], + LIBDEPS_PRIVATE=[ + '$BUILD_DIR/mongo/db/api_parameters', + '$BUILD_DIR/mongo/db/auth/auth', + '$BUILD_DIR/mongo/db/auth/authprivilege', + '$BUILD_DIR/mongo/idl/idl_parser', + '$BUILD_DIR/mongo/rpc/client_metadata', + 'logical_session_id_helpers', + ], +) + +env.Library( + target='kill_sessions_local', + source=[ + 'kill_sessions_local.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/query_exec', + 'kill_sessions', + ], + LIBDEPS_PRIVATE=[ + '$BUILD_DIR/mongo/db/transaction/transaction', + 'session_catalog', + ], +) diff --git a/src/mongo/db/initialize_operation_session_info.cpp b/src/mongo/db/session/initialize_operation_session_info.cpp index c00867e6386..d1f58a25dcf 100644 --- a/src/mongo/db/initialize_operation_session_info.cpp +++ b/src/mongo/db/session/initialize_operation_session_info.cpp @@ -29,13 +29,13 @@ #include "mongo/platform/basic.h" -#include "mongo/db/initialize_operation_session_info.h" +#include "mongo/db/session/initialize_operation_session_info.h" #include "mongo/db/auth/authorization_session.h" #include "mongo/db/internal_transactions_feature_flag_gen.h" -#include "mongo/db/logical_session_cache.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/logical_session_id_helpers.h" namespace mongo { diff --git a/src/mongo/db/initialize_operation_session_info.h b/src/mongo/db/session/initialize_operation_session_info.h index c1fed0ede7b..b2c1fcde67d 100644 --- a/src/mongo/db/initialize_operation_session_info.h +++ b/src/mongo/db/session/initialize_operation_session_info.h @@ -29,7 +29,7 @@ #pragma once -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" namespace mongo { diff --git a/src/mongo/db/internal_session_pool.cpp b/src/mongo/db/session/internal_session_pool.cpp index ff648c880fe..98611a0bad2 100644 --- a/src/mongo/db/internal_session_pool.cpp +++ b/src/mongo/db/session/internal_session_pool.cpp @@ -30,10 +30,10 @@ #include "mongo/platform/basic.h" -#include "mongo/db/internal_session_pool.h" -#include "mongo/db/logical_session_cache.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/service_context.h" +#include "mongo/db/session/internal_session_pool.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/logv2/log.h" #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl diff --git a/src/mongo/db/internal_session_pool.h b/src/mongo/db/session/internal_session_pool.h index a67cc2eb60a..a67cc2eb60a 100644 --- a/src/mongo/db/internal_session_pool.h +++ b/src/mongo/db/session/internal_session_pool.h diff --git a/src/mongo/db/internal_session_pool_test.cpp b/src/mongo/db/session/internal_session_pool_test.cpp index a1bc1b8e413..6a1603922d2 100644 --- a/src/mongo/db/internal_session_pool_test.cpp +++ b/src/mongo/db/session/internal_session_pool_test.cpp @@ -29,13 +29,13 @@ #include "mongo/platform/basic.h" -#include "mongo/db/internal_session_pool.h" -#include "mongo/db/logical_session_cache.h" -#include "mongo/db/logical_session_cache_impl.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/service_context_test_fixture.h" #include "mongo/db/service_liaison_mock.h" -#include "mongo/db/sessions_collection_mock.h" +#include "mongo/db/session/internal_session_pool.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/logical_session_cache_impl.h" +#include "mongo/db/session/logical_session_id_helpers.h" +#include "mongo/db/session/sessions_collection_mock.h" #include "mongo/idl/server_parameter_test_util.h" #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source_mock.h" diff --git a/src/mongo/db/kill_sessions.cpp b/src/mongo/db/session/kill_sessions.cpp index f2c3bc62c51..7626afa111b 100644 --- a/src/mongo/db/kill_sessions.cpp +++ b/src/mongo/db/session/kill_sessions.cpp @@ -29,7 +29,7 @@ #include "mongo/platform/basic.h" -#include "mongo/db/kill_sessions.h" +#include "mongo/db/session/kill_sessions.h" #include "mongo/db/api_parameters.h" #include "mongo/db/auth/authorization_session.h" diff --git a/src/mongo/db/kill_sessions.h b/src/mongo/db/session/kill_sessions.h index c666388208b..d4b29313bf2 100644 --- a/src/mongo/db/kill_sessions.h +++ b/src/mongo/db/session/kill_sessions.h @@ -34,8 +34,8 @@ #include "mongo/db/api_parameters.h" #include "mongo/db/auth/role_name.h" #include "mongo/db/auth/user_name.h" -#include "mongo/db/kill_sessions_gen.h" -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/kill_sessions_gen.h" +#include "mongo/db/session/logical_session_id.h" namespace mongo { diff --git a/src/mongo/db/kill_sessions.idl b/src/mongo/db/session/kill_sessions.idl index 1e20567195a..6081f8b0cef 100644 --- a/src/mongo/db/kill_sessions.idl +++ b/src/mongo/db/session/kill_sessions.idl @@ -29,11 +29,11 @@ global: cpp_namespace: "mongo" cpp_includes: - - "mongo/db/kill_sessions_util.h" + - "mongo/db/session/kill_sessions_util.h" imports: - "mongo/crypto/sha256_block.idl" - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/idl/basic_types.idl" structs: diff --git a/src/mongo/db/kill_sessions_common.cpp b/src/mongo/db/session/kill_sessions_common.cpp index 90a92c5d9b6..235c7dd3000 100644 --- a/src/mongo/db/kill_sessions_common.cpp +++ b/src/mongo/db/session/kill_sessions_common.cpp @@ -30,12 +30,12 @@ #include "mongo/platform/basic.h" -#include "mongo/db/kill_sessions_common.h" +#include "mongo/db/session/kill_sessions_common.h" #include "mongo/db/client.h" #include "mongo/db/operation_context.h" #include "mongo/db/service_context.h" -#include "mongo/db/session_killer.h" +#include "mongo/db/session/session_killer.h" #include "mongo/logv2/log.h" #include "mongo/rpc/metadata/client_metadata.h" diff --git a/src/mongo/db/kill_sessions_common.h b/src/mongo/db/session/kill_sessions_common.h index d74dda981a1..3f0a8ddb06d 100644 --- a/src/mongo/db/kill_sessions_common.h +++ b/src/mongo/db/session/kill_sessions_common.h @@ -29,14 +29,14 @@ #pragma once -#include "mongo/db/kill_sessions.h" +#include "mongo/db/session/kill_sessions.h" #include <vector> #include "mongo/base/status.h" #include "mongo/db/auth/authorization_session.h" #include "mongo/db/operation_context.h" -#include "mongo/db/session_killer.h" +#include "mongo/db/session/session_killer.h" #include "mongo/stdx/unordered_set.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/kill_sessions_local.cpp b/src/mongo/db/session/kill_sessions_local.cpp index fcb0b396ded..2665744a4eb 100644 --- a/src/mongo/db/kill_sessions_local.cpp +++ b/src/mongo/db/session/kill_sessions_local.cpp @@ -30,14 +30,14 @@ #include "mongo/platform/basic.h" -#include "mongo/db/kill_sessions_local.h" +#include "mongo/db/session/kill_sessions_local.h" #include "mongo/db/client.h" #include "mongo/db/cursor_manager.h" -#include "mongo/db/kill_sessions_common.h" #include "mongo/db/operation_context.h" #include "mongo/db/service_context.h" -#include "mongo/db/session_catalog.h" +#include "mongo/db/session/kill_sessions_common.h" +#include "mongo/db/session/session_catalog.h" #include "mongo/db/transaction/transaction_participant.h" #include "mongo/logv2/log.h" diff --git a/src/mongo/db/kill_sessions_local.h b/src/mongo/db/session/kill_sessions_local.h index e489589bdce..46b3a72120a 100644 --- a/src/mongo/db/kill_sessions_local.h +++ b/src/mongo/db/session/kill_sessions_local.h @@ -29,7 +29,7 @@ #pragma once -#include "mongo/db/session_killer.h" +#include "mongo/db/session/session_killer.h" /** * Mongod local kill session / transaction functionality library. diff --git a/src/mongo/db/kill_sessions_util.h b/src/mongo/db/session/kill_sessions_util.h index d7a9875e0a2..6094073326f 100644 --- a/src/mongo/db/kill_sessions_util.h +++ b/src/mongo/db/session/kill_sessions_util.h @@ -30,7 +30,7 @@ #pragma once #include "mongo/base/status.h" -#include "mongo/db/logical_session_id_helpers.h" +#include "mongo/db/session/logical_session_id_helpers.h" namespace mongo { diff --git a/src/mongo/db/logical_session_cache.cpp b/src/mongo/db/session/logical_session_cache.cpp index 1ebcd8cc24e..c56e344a833 100644 --- a/src/mongo/db/logical_session_cache.cpp +++ b/src/mongo/db/session/logical_session_cache.cpp @@ -29,7 +29,7 @@ #include "mongo/platform/basic.h" -#include "mongo/db/logical_session_cache.h" +#include "mongo/db/session/logical_session_cache.h" #include "mongo/db/operation_context.h" #include "mongo/db/service_context.h" diff --git a/src/mongo/db/logical_session_cache.h b/src/mongo/db/session/logical_session_cache.h index a6785d00494..051dcac3ad5 100644 --- a/src/mongo/db/logical_session_cache.h +++ b/src/mongo/db/session/logical_session_cache.h @@ -33,10 +33,10 @@ #include "mongo/base/status.h" #include "mongo/db/client.h" -#include "mongo/db/logical_session_cache_gen.h" -#include "mongo/db/logical_session_cache_stats_gen.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/logical_session_cache_gen.h" +#include "mongo/db/session/logical_session_cache_stats_gen.h" +#include "mongo/db/session/logical_session_id_helpers.h" namespace mongo { diff --git a/src/mongo/db/logical_session_cache.idl b/src/mongo/db/session/logical_session_cache.idl index 3294df14378..3294df14378 100644 --- a/src/mongo/db/logical_session_cache.idl +++ b/src/mongo/db/session/logical_session_cache.idl diff --git a/src/mongo/db/logical_session_cache_impl.cpp b/src/mongo/db/session/logical_session_cache_impl.cpp index 353fbd3bbdf..3991e614e5d 100644 --- a/src/mongo/db/logical_session_cache_impl.cpp +++ b/src/mongo/db/session/logical_session_cache_impl.cpp @@ -30,15 +30,15 @@ #include "mongo/platform/basic.h" -#include "mongo/db/logical_session_cache_impl.h" +#include "mongo/db/session/logical_session_cache_impl.h" #include "mongo/db/internal_transactions_feature_flag_gen.h" -#include "mongo/db/logical_session_id.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/s/operation_sharding_state.h" #include "mongo/db/service_context.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/logv2/log.h" #include "mongo/logv2/log_severity_suppressor.h" #include "mongo/platform/atomic_word.h" diff --git a/src/mongo/db/logical_session_cache_impl.h b/src/mongo/db/session/logical_session_cache_impl.h index ef13703005e..c23b6435882 100644 --- a/src/mongo/db/logical_session_cache_impl.h +++ b/src/mongo/db/session/logical_session_cache_impl.h @@ -29,9 +29,9 @@ #pragma once -#include "mongo/db/logical_session_cache.h" #include "mongo/db/service_liaison.h" -#include "mongo/db/sessions_collection.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/sessions_collection.h" #include "mongo/util/concurrency/with_lock.h" #include "mongo/util/functional.h" #include "mongo/util/hierarchical_acquisition.h" diff --git a/src/mongo/db/logical_session_cache_noop.h b/src/mongo/db/session/logical_session_cache_noop.h index 5d6e12e5f78..7ba8f593d3d 100644 --- a/src/mongo/db/logical_session_cache_noop.h +++ b/src/mongo/db/session/logical_session_cache_noop.h @@ -29,7 +29,7 @@ #pragma once -#include "mongo/db/logical_session_cache.h" +#include "mongo/db/session/logical_session_cache.h" namespace mongo { diff --git a/src/mongo/db/logical_session_cache_stats.idl b/src/mongo/db/session/logical_session_cache_stats.idl index b0adff82caa..b0adff82caa 100644 --- a/src/mongo/db/logical_session_cache_stats.idl +++ b/src/mongo/db/session/logical_session_cache_stats.idl diff --git a/src/mongo/db/logical_session_cache_test.cpp b/src/mongo/db/session/logical_session_cache_test.cpp index 11e5eaa3477..8d9220ebfb8 100644 --- a/src/mongo/db/logical_session_cache_test.cpp +++ b/src/mongo/db/session/logical_session_cache_test.cpp @@ -29,7 +29,7 @@ #include "mongo/platform/basic.h" -#include "mongo/db/logical_session_cache_impl.h" +#include "mongo/db/session/logical_session_cache_impl.h" #include <memory> @@ -39,14 +39,14 @@ #include "mongo/db/auth/authz_manager_external_state_mock.h" #include "mongo/db/auth/authz_session_external_state_mock.h" #include "mongo/db/auth/user_name.h" -#include "mongo/db/logical_session_cache.h" -#include "mongo/db/logical_session_id.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" #include "mongo/db/service_context.h" #include "mongo/db/service_context_test_fixture.h" #include "mongo/db/service_liaison_mock.h" -#include "mongo/db/sessions_collection_mock.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/logical_session_id_helpers.h" +#include "mongo/db/session/sessions_collection_mock.h" #include "mongo/idl/server_parameter_test_util.h" #include "mongo/stdx/future.h" #include "mongo/unittest/ensure_fcv.h" diff --git a/src/mongo/db/logical_session_id.cpp b/src/mongo/db/session/logical_session_id.cpp index 764231544ae..d5d4d76af2c 100644 --- a/src/mongo/db/logical_session_id.cpp +++ b/src/mongo/db/session/logical_session_id.cpp @@ -29,7 +29,7 @@ #include "mongo/platform/basic.h" -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" namespace mongo { diff --git a/src/mongo/db/logical_session_id.h b/src/mongo/db/session/logical_session_id.h index ec0d331bce6..bb7bb148669 100644 --- a/src/mongo/db/logical_session_id.h +++ b/src/mongo/db/session/logical_session_id.h @@ -33,7 +33,7 @@ #include <string> #include "mongo/base/status_with.h" -#include "mongo/db/logical_session_id_gen.h" +#include "mongo/db/session/logical_session_id_gen.h" #include "mongo/stdx/unordered_set.h" #include "mongo/util/uuid.h" diff --git a/src/mongo/db/logical_session_id.idl b/src/mongo/db/session/logical_session_id.idl index 85cf3ba1435..85cf3ba1435 100644 --- a/src/mongo/db/logical_session_id.idl +++ b/src/mongo/db/session/logical_session_id.idl diff --git a/src/mongo/db/logical_session_id_helpers.cpp b/src/mongo/db/session/logical_session_id_helpers.cpp index 20d4659d77f..553443e71d5 100644 --- a/src/mongo/db/logical_session_id_helpers.cpp +++ b/src/mongo/db/session/logical_session_id_helpers.cpp @@ -29,14 +29,14 @@ #include "mongo/platform/basic.h" -#include "mongo/db/logical_session_id_helpers.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/db/auth/authorization_session.h" #include "mongo/db/auth/user.h" #include "mongo/db/auth/user_name.h" #include "mongo/db/commands/feature_compatibility_version_documentation.h" -#include "mongo/db/logical_session_cache.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/logical_session_cache.h" namespace mongo { namespace { diff --git a/src/mongo/db/logical_session_id_helpers.h b/src/mongo/db/session/logical_session_id_helpers.h index 6d1a398c41a..cb140d292ed 100644 --- a/src/mongo/db/logical_session_id_helpers.h +++ b/src/mongo/db/session/logical_session_id_helpers.h @@ -33,7 +33,7 @@ #include <vector> #include "mongo/db/auth/privilege.h" -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" namespace mongo { diff --git a/src/mongo/db/logical_session_id_test.cpp b/src/mongo/db/session/logical_session_id_test.cpp index 00cc1b313d0..736525ecf0f 100644 --- a/src/mongo/db/logical_session_id_test.cpp +++ b/src/mongo/db/session/logical_session_id_test.cpp @@ -31,7 +31,7 @@ #include <string> -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/crypto/mechanism_scram.h" #include "mongo/crypto/sha1_block.h" @@ -45,16 +45,16 @@ #include "mongo/db/auth/authz_session_external_state_mock.h" #include "mongo/db/auth/sasl_options.h" #include "mongo/db/auth/user.h" -#include "mongo/db/initialize_operation_session_info.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_cache.h" -#include "mongo/db/logical_session_cache_impl.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" #include "mongo/db/service_context.h" #include "mongo/db/service_context_test_fixture.h" #include "mongo/db/service_liaison_mock.h" -#include "mongo/db/sessions_collection_mock.h" +#include "mongo/db/session/initialize_operation_session_info.h" +#include "mongo/db/session/logical_session_cache.h" +#include "mongo/db/session/logical_session_cache_impl.h" +#include "mongo/db/session/logical_session_id_helpers.h" +#include "mongo/db/session/sessions_collection_mock.h" #include "mongo/transport/session.h" #include "mongo/transport/transport_layer_mock.h" #include "mongo/unittest/unittest.h" diff --git a/src/mongo/db/session.h b/src/mongo/db/session/session.h index 256f7ff28b1..471d253aac4 100644 --- a/src/mongo/db/session.h +++ b/src/mongo/db/session/session.h @@ -29,8 +29,8 @@ #pragma once -#include "mongo/db/logical_session_id.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/util/concurrency/with_lock.h" #include "mongo/util/decorable.h" diff --git a/src/mongo/db/session_catalog.cpp b/src/mongo/db/session/session_catalog.cpp index b358125cf95..f3d643a70f6 100644 --- a/src/mongo/db/session_catalog.cpp +++ b/src/mongo/db/session/session_catalog.cpp @@ -30,14 +30,14 @@ #include "mongo/platform/basic.h" -#include "mongo/db/session_catalog.h" +#include "mongo/db/session/session_catalog.h" #include <memory> #include "mongo/db/internal_transactions_feature_flag_gen.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/server_options.h" #include "mongo/db/service_context.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/logv2/log.h" #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite diff --git a/src/mongo/db/session_catalog.h b/src/mongo/db/session/session_catalog.h index 6201d6fd72b..bba338caf79 100644 --- a/src/mongo/db/session_catalog.h +++ b/src/mongo/db/session/session_catalog.h @@ -33,11 +33,11 @@ #include <vector> #include "mongo/db/client.h" -#include "mongo/db/logical_session_id.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" -#include "mongo/db/session.h" -#include "mongo/db/session_killer.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/logical_session_id_helpers.h" +#include "mongo/db/session/session.h" +#include "mongo/db/session/session_killer.h" #include "mongo/platform/mutex.h" #include "mongo/stdx/condition_variable.h" #include "mongo/stdx/unordered_map.h" diff --git a/src/mongo/db/session_catalog_mongod.cpp b/src/mongo/db/session/session_catalog_mongod.cpp index e851ab6a53a..1d5bc3df966 100644 --- a/src/mongo/db/session_catalog_mongod.cpp +++ b/src/mongo/db/session/session_catalog_mongod.cpp @@ -30,7 +30,7 @@ #include "mongo/platform/basic.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/bson/bsonmisc.h" #include "mongo/db/catalog_raii.h" @@ -45,8 +45,8 @@ #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/sessions_collection.h" -#include "mongo/db/transaction/session_txn_record_gen.h" +#include "mongo/db/session/session_txn_record_gen.h" +#include "mongo/db/session/sessions_collection.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/session_catalog_mongod.h b/src/mongo/db/session/session_catalog_mongod.h index 5c092e7e005..a2de7228bec 100644 --- a/src/mongo/db/session_catalog_mongod.h +++ b/src/mongo/db/session/session_catalog_mongod.h @@ -29,7 +29,7 @@ #pragma once -#include "mongo/db/session_catalog.h" +#include "mongo/db/session/session_catalog.h" namespace mongo { diff --git a/src/mongo/db/session_catalog_mongod_test.cpp b/src/mongo/db/session/session_catalog_mongod_test.cpp index 80afc0f4d9a..29acb444f56 100644 --- a/src/mongo/db/session_catalog_mongod_test.cpp +++ b/src/mongo/db/session/session_catalog_mongod_test.cpp @@ -32,9 +32,9 @@ #include "mongo/db/dbdirectclient.h" #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/sessions_collection_mock.h" -#include "mongo/db/transaction/session_txn_record_gen.h" +#include "mongo/db/session/session_catalog_mongod.h" +#include "mongo/db/session/session_txn_record_gen.h" +#include "mongo/db/session/sessions_collection_mock.h" #include "mongo/util/clock_source_mock.h" namespace mongo { diff --git a/src/mongo/db/session_catalog_test.cpp b/src/mongo/db/session/session_catalog_test.cpp index 33c8f5354b8..cb400befde9 100644 --- a/src/mongo/db/session_catalog_test.cpp +++ b/src/mongo/db/session/session_catalog_test.cpp @@ -34,7 +34,7 @@ #include "mongo/db/cancelable_operation_context.h" #include "mongo/db/service_context_test_fixture.h" -#include "mongo/db/session_catalog.h" +#include "mongo/db/session/session_catalog.h" #include "mongo/idl/server_parameter_test_util.h" #include "mongo/logv2/log.h" #include "mongo/stdx/future.h" diff --git a/src/mongo/db/session_killer.cpp b/src/mongo/db/session/session_killer.cpp index 7ad7aac1e74..f9effaa3f22 100644 --- a/src/mongo/db/session_killer.cpp +++ b/src/mongo/db/session/session_killer.cpp @@ -29,12 +29,12 @@ #include "mongo/platform/basic.h" -#include "mongo/db/session_killer.h" +#include "mongo/db/session/session_killer.h" #include "mongo/db/client.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" #include "mongo/db/service_context.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/util/destructor_guard.h" #include "mongo/util/scopeguard.h" diff --git a/src/mongo/db/session_killer.h b/src/mongo/db/session/session_killer.h index 3dde3893058..59e27dc7fc7 100644 --- a/src/mongo/db/session_killer.h +++ b/src/mongo/db/session/session_killer.h @@ -36,7 +36,7 @@ #include <vector> #include "mongo/base/status_with.h" -#include "mongo/db/kill_sessions.h" +#include "mongo/db/session/kill_sessions.h" #include "mongo/platform/mutex.h" #include "mongo/stdx/condition_variable.h" #include "mongo/stdx/thread.h" diff --git a/src/mongo/db/transaction/session_txn_record.idl b/src/mongo/db/session/session_txn_record.idl index 6970de0247d..8bf014a16b7 100644 --- a/src/mongo/db/transaction/session_txn_record.idl +++ b/src/mongo/db/session/session_txn_record.idl @@ -31,12 +31,12 @@ global: cpp_namespace: "mongo" cpp_includes: - - "mongo/db/logical_session_id.h" + - "mongo/db/session/logical_session_id.h" - "mongo/db/repl/optime.h" imports: - "mongo/idl/basic_types.idl" - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/db/repl/replication_types.idl" enums: diff --git a/src/mongo/db/sessions_collection.cpp b/src/mongo/db/session/sessions_collection.cpp index 39ef5fcc8b7..4fc79189206 100644 --- a/src/mongo/db/sessions_collection.cpp +++ b/src/mongo/db/session/sessions_collection.cpp @@ -29,7 +29,7 @@ #include "mongo/platform/basic.h" -#include "mongo/db/sessions_collection.h" +#include "mongo/db/session/sessions_collection.h" #include <functional> #include <memory> @@ -38,10 +38,10 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/client/dbclient_base.h" #include "mongo/db/create_indexes_gen.h" -#include "mongo/db/logical_session_id.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/ops/write_ops.h" #include "mongo/db/repl/read_concern_args.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/rpc/get_status_from_command_result.h" namespace mongo { diff --git a/src/mongo/db/sessions_collection.h b/src/mongo/db/session/sessions_collection.h index 84689144ec6..34542c9a682 100644 --- a/src/mongo/db/sessions_collection.h +++ b/src/mongo/db/session/sessions_collection.h @@ -31,7 +31,7 @@ #include <functional> -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" namespace mongo { diff --git a/src/mongo/db/sessions_collection_mock.cpp b/src/mongo/db/session/sessions_collection_mock.cpp index 1919e7d5bf0..fd00244e477 100644 --- a/src/mongo/db/sessions_collection_mock.cpp +++ b/src/mongo/db/session/sessions_collection_mock.cpp @@ -29,7 +29,7 @@ #include <functional> -#include "mongo/db/sessions_collection_mock.h" +#include "mongo/db/session/sessions_collection_mock.h" #include "mongo/platform/basic.h" namespace mongo { diff --git a/src/mongo/db/sessions_collection_mock.h b/src/mongo/db/session/sessions_collection_mock.h index 1d95af63f2c..cafa41e05f1 100644 --- a/src/mongo/db/sessions_collection_mock.h +++ b/src/mongo/db/session/sessions_collection_mock.h @@ -31,8 +31,8 @@ #include <functional> -#include "mongo/db/logical_session_id.h" -#include "mongo/db/sessions_collection.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/sessions_collection.h" #include "mongo/platform/mutex.h" #include "mongo/stdx/unordered_map.h" diff --git a/src/mongo/db/sessions_collection_rs.cpp b/src/mongo/db/session/sessions_collection_rs.cpp index 4a60f4489c5..865f0b825e9 100644 --- a/src/mongo/db/sessions_collection_rs.cpp +++ b/src/mongo/db/session/sessions_collection_rs.cpp @@ -29,7 +29,7 @@ #include "mongo/platform/basic.h" -#include "mongo/db/sessions_collection_rs.h" +#include "mongo/db/session/sessions_collection_rs.h" #include <boost/optional.hpp> #include <memory> diff --git a/src/mongo/db/sessions_collection_rs.h b/src/mongo/db/session/sessions_collection_rs.h index 7382112e6af..d88b32866c6 100644 --- a/src/mongo/db/sessions_collection_rs.h +++ b/src/mongo/db/session/sessions_collection_rs.h @@ -34,9 +34,9 @@ #include "mongo/client/connpool.h" #include "mongo/client/remote_command_targeter.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/namespace_string.h" -#include "mongo/db/sessions_collection.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/sessions_collection.h" #include "mongo/platform/mutex.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/db/sessions_collection_standalone.cpp b/src/mongo/db/session/sessions_collection_standalone.cpp index 93e7aab9821..94fb61cfc75 100644 --- a/src/mongo/db/sessions_collection_standalone.cpp +++ b/src/mongo/db/session/sessions_collection_standalone.cpp @@ -29,7 +29,7 @@ #include "mongo/platform/basic.h" -#include "mongo/db/sessions_collection_standalone.h" +#include "mongo/db/session/sessions_collection_standalone.h" #include "mongo/db/dbdirectclient.h" #include "mongo/db/operation_context.h" diff --git a/src/mongo/db/sessions_collection_standalone.h b/src/mongo/db/session/sessions_collection_standalone.h index d8de38502ca..f0f3d567d20 100644 --- a/src/mongo/db/sessions_collection_standalone.h +++ b/src/mongo/db/session/sessions_collection_standalone.h @@ -29,8 +29,8 @@ #pragma once -#include "mongo/db/logical_session_id.h" -#include "mongo/db/sessions_collection.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/sessions_collection.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/db/set_change_stream_state_coordinator.idl b/src/mongo/db/set_change_stream_state_coordinator.idl index b3861888cdc..0a43f78e264 100644 --- a/src/mongo/db/set_change_stream_state_coordinator.idl +++ b/src/mongo/db/set_change_stream_state_coordinator.idl @@ -31,7 +31,7 @@ global: cpp_namespace: "mongo" imports: - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/idl/basic_types.idl" structs: @@ -58,4 +58,4 @@ structs: type: SetChangeStreamStateCoordinatorId command: description: "The command to be executed by the 'SetChangeStreamStateCoordinator'" - type: object_owned
\ No newline at end of file + type: object_owned diff --git a/src/mongo/db/transaction/SConscript b/src/mongo/db/transaction/SConscript index f64da4c08cb..c4f2b197f96 100644 --- a/src/mongo/db/transaction/SConscript +++ b/src/mongo/db/transaction/SConscript @@ -7,7 +7,8 @@ env = env.Clone() env.Library( target='transaction', source=[ - '$BUILD_DIR/mongo/db/session_catalog_mongod.cpp', + '$BUILD_DIR/mongo/db/session/session_catalog_mongod.cpp', + '$BUILD_DIR/mongo/db/session/session_txn_record.idl', 'internal_transactions_reap_service.cpp', 'retryable_writes_stats.cpp', 'server_transactions_metrics.cpp', @@ -16,7 +17,6 @@ env.Library( 'transaction_participant.cpp', 'transaction_participant_resource_yielder.cpp', 'internal_transactions_reap_service.idl', - 'session_txn_record.idl', 'transaction_participant.idl', 'transactions_stats.idl', ], @@ -42,7 +42,7 @@ env.Library( '$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/session/session_catalog', '$BUILD_DIR/mongo/db/stats/fill_locker_info', '$BUILD_DIR/mongo/db/stats/top', '$BUILD_DIR/mongo/db/stats/transaction_stats', @@ -61,15 +61,15 @@ env.Library( ], 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/session/logical_session_id', + '$BUILD_DIR/mongo/db/session/logical_session_id_helpers', + '$BUILD_DIR/mongo/db/session/session_catalog', '$BUILD_DIR/mongo/db/shared_request_handling', '$BUILD_DIR/mongo/executor/task_executor_interface', '$BUILD_DIR/mongo/rpc/command_status', diff --git a/src/mongo/db/transaction/internal_transactions_reap_service.cpp b/src/mongo/db/transaction/internal_transactions_reap_service.cpp index 280ed58a66e..65d5ba95c5a 100644 --- a/src/mongo/db/transaction/internal_transactions_reap_service.cpp +++ b/src/mongo/db/transaction/internal_transactions_reap_service.cpp @@ -29,7 +29,7 @@ #include "mongo/db/transaction/internal_transactions_reap_service.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/transaction/internal_transactions_reap_service_gen.h" #include "mongo/logv2/log.h" diff --git a/src/mongo/db/transaction/internal_transactions_reap_service_test.cpp b/src/mongo/db/transaction/internal_transactions_reap_service_test.cpp index 18c70c2d64e..751c5472545 100644 --- a/src/mongo/db/transaction/internal_transactions_reap_service_test.cpp +++ b/src/mongo/db/transaction/internal_transactions_reap_service_test.cpp @@ -33,10 +33,10 @@ #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/session_catalog_mongod.h" +#include "mongo/db/session/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/transaction/transaction_api.cpp b/src/mongo/db/transaction/transaction_api.cpp index e44b7f1027f..38f7fb86eec 100644 --- a/src/mongo/db/transaction/transaction_api.cpp +++ b/src/mongo/db/transaction/transaction_api.cpp @@ -38,8 +38,6 @@ #include "mongo/db/commands.h" #include "mongo/db/commands/txn_cmds_gen.h" #include "mongo/db/error_labels.h" -#include "mongo/db/internal_session_pool.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/namespace_string.h" #include "mongo/db/operation_context.h" #include "mongo/db/operation_time_tracker.h" @@ -49,7 +47,9 @@ #include "mongo/db/repl/read_concern_args.h" #include "mongo/db/repl/repl_client_info.h" #include "mongo/db/s/operation_sharding_state.h" -#include "mongo/db/session_catalog.h" +#include "mongo/db/session/internal_session_pool.h" +#include "mongo/db/session/logical_session_id_helpers.h" +#include "mongo/db/session/session_catalog.h" #include "mongo/db/transaction_validation.h" #include "mongo/db/write_concern_options.h" #include "mongo/executor/task_executor.h" diff --git a/src/mongo/db/transaction/transaction_api.h b/src/mongo/db/transaction/transaction_api.h index 9a04c121eba..2e898f589c4 100644 --- a/src/mongo/db/transaction/transaction_api.h +++ b/src/mongo/db/transaction/transaction_api.h @@ -30,10 +30,10 @@ #pragma once #include "mongo/db/cancelable_operation_context.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/operation_context.h" #include "mongo/db/query/find_command_gen.h" #include "mongo/db/resource_yielder.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/executor/task_executor.h" #include "mongo/rpc/write_concern_error_detail.h" #include "mongo/s/write_ops/batched_command_request.h" diff --git a/src/mongo/db/transaction/transaction_api_test.cpp b/src/mongo/db/transaction/transaction_api_test.cpp index 7a2d5fb004b..c15b572b55a 100644 --- a/src/mongo/db/transaction/transaction_api_test.cpp +++ b/src/mongo/db/transaction/transaction_api_test.cpp @@ -34,11 +34,11 @@ #include "mongo/config.h" #include "mongo/db/commands.h" #include "mongo/db/error_labels.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" #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/session/logical_session_id_helpers.h" #include "mongo/db/transaction/transaction_api.h" #include "mongo/executor/network_interface_factory.h" #include "mongo/executor/thread_pool_task_executor.h" diff --git a/src/mongo/db/transaction/transaction_participant.cpp b/src/mongo/db/transaction/transaction_participant.cpp index 43ade31c7fe..28c22397d5d 100644 --- a/src/mongo/db/transaction/transaction_participant.cpp +++ b/src/mongo/db/transaction/transaction_participant.cpp @@ -51,7 +51,6 @@ #include "mongo/db/dbhelpers.h" #include "mongo/db/index/index_access_method.h" #include "mongo/db/internal_transactions_feature_flag_gen.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/op_observer/op_observer.h" #include "mongo/db/ops/update.h" #include "mongo/db/ops/write_ops_retryability.h" @@ -61,7 +60,8 @@ #include "mongo/db/repl/storage_interface.h" #include "mongo/db/s/sharding_write_router.h" #include "mongo/db/server_recovery.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/stats/fill_locker_info.h" #include "mongo/db/storage/flow_control.h" #include "mongo/db/transaction/retryable_writes_stats.h" diff --git a/src/mongo/db/transaction/transaction_participant.h b/src/mongo/db/transaction/transaction_participant.h index 79ecabef527..2ef6995dc6e 100644 --- a/src/mongo/db/transaction/transaction_participant.h +++ b/src/mongo/db/transaction/transaction_participant.h @@ -38,19 +38,19 @@ #include "mongo/db/commands/txn_cmds_gen.h" #include "mongo/db/concurrency/d_concurrency.h" #include "mongo/db/concurrency/locker.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/multi_key_path_tracker.h" #include "mongo/db/ops/update_request.h" #include "mongo/db/repl/oplog.h" #include "mongo/db/repl/oplog_entry.h" #include "mongo/db/repl/optime.h" #include "mongo/db/repl/read_concern_args.h" -#include "mongo/db/session.h" -#include "mongo/db/session_catalog.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/session.h" +#include "mongo/db/session/session_catalog.h" +#include "mongo/db/session/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/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" diff --git a/src/mongo/db/transaction/transaction_participant_resource_yielder.cpp b/src/mongo/db/transaction/transaction_participant_resource_yielder.cpp index 5143ee239fd..4a6ae9c71a1 100644 --- a/src/mongo/db/transaction/transaction_participant_resource_yielder.cpp +++ b/src/mongo/db/transaction/transaction_participant_resource_yielder.cpp @@ -29,8 +29,8 @@ #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/session/session_catalog.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/transaction/transaction_participant.h" namespace mongo { diff --git a/src/mongo/db/transaction/transaction_participant_retryable_writes_test.cpp b/src/mongo/db/transaction/transaction_participant_retryable_writes_test.cpp index 0b5c86ecbc9..7987d73f75f 100644 --- a/src/mongo/db/transaction/transaction_participant_retryable_writes_test.cpp +++ b/src/mongo/db/transaction/transaction_participant_retryable_writes_test.cpp @@ -44,7 +44,7 @@ #include "mongo/db/repl/storage_interface_impl.h" #include "mongo/db/server_options.h" #include "mongo/db/service_context.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/transaction/server_transactions_metrics.h" #include "mongo/db/transaction/transaction_participant.h" #include "mongo/idl/server_parameter_test_util.h" diff --git a/src/mongo/db/transaction/transaction_participant_test.cpp b/src/mongo/db/transaction/transaction_participant_test.cpp index 16c8d1ba235..2150768e863 100644 --- a/src/mongo/db/transaction/transaction_participant_test.cpp +++ b/src/mongo/db/transaction/transaction_participant_test.cpp @@ -42,8 +42,8 @@ #include "mongo/db/repl/storage_interface_impl.h" #include "mongo/db/repl/storage_interface_mock.h" #include "mongo/db/service_context.h" -#include "mongo/db/session_catalog.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/session_catalog.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/stats/fill_locker_info.h" #include "mongo/db/transaction/server_transactions_metrics.h" #include "mongo/db/transaction/transaction_participant.h" diff --git a/src/mongo/db/transaction_validation.cpp b/src/mongo/db/transaction_validation.cpp index 2f4eedd12b5..eb634a9e469 100644 --- a/src/mongo/db/transaction_validation.cpp +++ b/src/mongo/db/transaction_validation.cpp @@ -36,7 +36,7 @@ #include "mongo/db/commands.h" #include "mongo/db/commands/txn_cmds_gen.h" #include "mongo/db/commands/txn_two_phase_commit_cmds_gen.h" -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/db/write_concern_options.h" namespace mongo { diff --git a/src/mongo/db/transaction_validation.h b/src/mongo/db/transaction_validation.h index e3c4d21f201..f0c12bcb352 100644 --- a/src/mongo/db/transaction_validation.h +++ b/src/mongo/db/transaction_validation.h @@ -29,8 +29,8 @@ #pragma once -#include "mongo/db/logical_session_id.h" #include "mongo/db/repl/read_concern_level.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/db/write_concern_options.h" namespace mongo { diff --git a/src/mongo/db/txn_retry_counter_too_old_info.h b/src/mongo/db/txn_retry_counter_too_old_info.h index f126af7ede1..7e0c95e0a60 100644 --- a/src/mongo/db/txn_retry_counter_too_old_info.h +++ b/src/mongo/db/txn_retry_counter_too_old_info.h @@ -32,7 +32,7 @@ #include "mongo/base/error_extra_info.h" #include "mongo/bson/bsonobj.h" #include "mongo/bson/bsonobjbuilder.h" -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" namespace mongo { diff --git a/src/mongo/dbtests/SConscript b/src/mongo/dbtests/SConscript index f0c65377e4b..53a7fe46854 100644 --- a/src/mongo/dbtests/SConscript +++ b/src/mongo/dbtests/SConscript @@ -172,7 +172,7 @@ env.Program( "$BUILD_DIR/mongo/db/repl/serveronly_repl", "$BUILD_DIR/mongo/db/repl/storage_interface_impl", "$BUILD_DIR/mongo/db/server_options_core", - "$BUILD_DIR/mongo/db/sessions_collection_standalone", + "$BUILD_DIR/mongo/db/session/sessions_collection_standalone", "$BUILD_DIR/mongo/db/storage/durable_catalog_impl", "$BUILD_DIR/mongo/db/storage/storage_engine_impl", "$BUILD_DIR/mongo/db/traffic_reader", diff --git a/src/mongo/dbtests/logical_sessions_tests.cpp b/src/mongo/dbtests/logical_sessions_tests.cpp index bf5e62466b3..a2c853f759b 100644 --- a/src/mongo/dbtests/logical_sessions_tests.cpp +++ b/src/mongo/dbtests/logical_sessions_tests.cpp @@ -33,10 +33,10 @@ #include "mongo/client/index_spec.h" #include "mongo/db/dbdirectclient.h" -#include "mongo/db/logical_session_id.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" -#include "mongo/db/sessions_collection_standalone.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/logical_session_id_helpers.h" +#include "mongo/db/session/sessions_collection_standalone.h" #include "mongo/dbtests/dbtests.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/embedded/SConscript b/src/mongo/embedded/SConscript index 9479715f7b9..56b2ed1861d 100644 --- a/src/mongo/embedded/SConscript +++ b/src/mongo/embedded/SConscript @@ -91,8 +91,6 @@ env.Library( '$BUILD_DIR/mongo/db/index/index_access_method_factory', '$BUILD_DIR/mongo/db/index/index_access_methods', '$BUILD_DIR/mongo/db/index_builds_coordinator_interface', - '$BUILD_DIR/mongo/db/logical_session_cache', - '$BUILD_DIR/mongo/db/logical_session_cache_impl', '$BUILD_DIR/mongo/db/op_observer/fcv_op_observer', '$BUILD_DIR/mongo/db/op_observer/op_observer', '$BUILD_DIR/mongo/db/op_observer/op_observer_impl', @@ -107,7 +105,9 @@ env.Library( '$BUILD_DIR/mongo/db/service_context', '$BUILD_DIR/mongo/db/service_entry_point_common', '$BUILD_DIR/mongo/db/service_liaison_mongod', - '$BUILD_DIR/mongo/db/sessions_collection_standalone', + '$BUILD_DIR/mongo/db/session/logical_session_cache', + '$BUILD_DIR/mongo/db/session/logical_session_cache_impl', + '$BUILD_DIR/mongo/db/session/sessions_collection_standalone', '$BUILD_DIR/mongo/db/startup_recovery', '$BUILD_DIR/mongo/db/storage/storage_control', '$BUILD_DIR/mongo/db/storage/storage_engine_common', diff --git a/src/mongo/embedded/embedded.cpp b/src/mongo/embedded/embedded.cpp index d6a662076fb..a303ab0e4c9 100644 --- a/src/mongo/embedded/embedded.cpp +++ b/src/mongo/embedded/embedded.cpp @@ -47,15 +47,15 @@ #include "mongo/db/dbdirectclient.h" #include "mongo/db/global_settings.h" #include "mongo/db/index/index_access_method_factory_impl.h" -#include "mongo/db/kill_sessions_local.h" -#include "mongo/db/logical_session_cache_impl.h" #include "mongo/db/op_observer/op_observer_impl.h" #include "mongo/db/op_observer/op_observer_registry.h" #include "mongo/db/repl/storage_interface_impl.h" #include "mongo/db/s/collection_sharding_state_factory_standalone.h" #include "mongo/db/service_liaison_mongod.h" -#include "mongo/db/session_killer.h" -#include "mongo/db/sessions_collection_standalone.h" +#include "mongo/db/session/kill_sessions_local.h" +#include "mongo/db/session/logical_session_cache_impl.h" +#include "mongo/db/session/session_killer.h" +#include "mongo/db/session/sessions_collection_standalone.h" #include "mongo/db/startup_recovery.h" #include "mongo/db/storage/control/storage_control.h" #include "mongo/db/storage/encryption_hooks.h" diff --git a/src/mongo/executor/task_executor_cursor.h b/src/mongo/executor/task_executor_cursor.h index ba5a00b0120..59015e87d1c 100644 --- a/src/mongo/executor/task_executor_cursor.h +++ b/src/mongo/executor/task_executor_cursor.h @@ -36,9 +36,9 @@ #include "mongo/base/status_with.h" #include "mongo/bson/bsonobj.h" #include "mongo/db/cursor_id.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/namespace_string.h" #include "mongo/db/query/cursor_response.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/executor/remote_command_request.h" #include "mongo/executor/task_executor.h" #include "mongo/util/duration.h" diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript index 07ee90c5051..3f521841d3a 100644 --- a/src/mongo/s/SConscript +++ b/src/mongo/s/SConscript @@ -60,10 +60,10 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/db/commands/txn_cmd_request', '$BUILD_DIR/mongo/db/curop', - '$BUILD_DIR/mongo/db/logical_session_id_helpers', '$BUILD_DIR/mongo/db/pipeline/process_interface/mongo_process_interface', '$BUILD_DIR/mongo/db/repl/read_concern_args', - '$BUILD_DIR/mongo/db/session_catalog', + '$BUILD_DIR/mongo/db/session/logical_session_id_helpers', + '$BUILD_DIR/mongo/db/session/session_catalog', '$BUILD_DIR/mongo/db/shared_request_handling', 'async_requests_sender', 'grid', @@ -71,7 +71,7 @@ env.Library( LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/catalog/collection_uuid_mismatch_info', '$BUILD_DIR/mongo/db/internal_transactions_feature_flag', - '$BUILD_DIR/mongo/db/sessions_collection', + '$BUILD_DIR/mongo/db/session/sessions_collection', ], ) @@ -375,8 +375,8 @@ env.Library( 'sessions_collection_sharded.cpp', ], LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/db/logical_session_id', - '$BUILD_DIR/mongo/db/sessions_collection', + '$BUILD_DIR/mongo/db/session/logical_session_id', + '$BUILD_DIR/mongo/db/session/sessions_collection', 'sharding_api', ], ) @@ -400,7 +400,7 @@ env.Library( LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/not_primary_error_tracker', '$BUILD_DIR/mongo/db/read_write_concern_defaults', - '$BUILD_DIR/mongo/db/session_catalog', + '$BUILD_DIR/mongo/db/session/session_catalog', 'commands/cluster_commands_common', 'load_balancer_support', 'sharding_router_api', @@ -428,8 +428,6 @@ env.Library( '$BUILD_DIR/mongo/db/curop', '$BUILD_DIR/mongo/db/dbdirectclient', '$BUILD_DIR/mongo/db/ftdc/ftdc_mongos', - '$BUILD_DIR/mongo/db/logical_session_cache', - '$BUILD_DIR/mongo/db/logical_session_cache_impl', '$BUILD_DIR/mongo/db/logical_time_metadata_hook', '$BUILD_DIR/mongo/db/pipeline/process_interface/mongos_process_interface_factory', '$BUILD_DIR/mongo/db/process_health/fault_manager', @@ -437,7 +435,9 @@ env.Library( '$BUILD_DIR/mongo/db/server_options', '$BUILD_DIR/mongo/db/server_options_base', '$BUILD_DIR/mongo/db/service_liaison_mongos', - '$BUILD_DIR/mongo/db/session_catalog', + '$BUILD_DIR/mongo/db/session/logical_session_cache', + '$BUILD_DIR/mongo/db/session/logical_session_cache_impl', + '$BUILD_DIR/mongo/db/session/session_catalog', '$BUILD_DIR/mongo/db/startup_warnings_common', '$BUILD_DIR/mongo/db/stats/counters', '$BUILD_DIR/mongo/db/windows_options' if env.TargetOSIs('windows') else [], @@ -500,7 +500,7 @@ env.Library( '$BUILD_DIR/mongo/db/read_write_concern_defaults', '$BUILD_DIR/mongo/db/serverinit', '$BUILD_DIR/mongo/db/service_liaison_mongos', - '$BUILD_DIR/mongo/db/session_catalog', + '$BUILD_DIR/mongo/db/session/session_catalog', '$BUILD_DIR/mongo/db/startup_warnings_common', '$BUILD_DIR/mongo/idl/cluster_server_parameter_refresher', '$BUILD_DIR/mongo/transport/service_entry_point', diff --git a/src/mongo/s/catalog/SConscript b/src/mongo/s/catalog/SConscript index 53ce04524d4..231c0a87acc 100644 --- a/src/mongo/s/catalog/SConscript +++ b/src/mongo/s/catalog/SConscript @@ -29,7 +29,7 @@ env.Library( 'sharding_catalog_client', ], LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/db/logical_session_id_helpers', + '$BUILD_DIR/mongo/db/session/logical_session_id_helpers', '$BUILD_DIR/mongo/util/pcre_wrapper', ], ) diff --git a/src/mongo/s/catalog/sharding_catalog_client_impl.cpp b/src/mongo/s/catalog/sharding_catalog_client_impl.cpp index c1d4d03af7e..8727da6767a 100644 --- a/src/mongo/s/catalog/sharding_catalog_client_impl.cpp +++ b/src/mongo/s/catalog/sharding_catalog_client_impl.cpp @@ -37,7 +37,6 @@ #include "mongo/client/read_preference.h" #include "mongo/client/remote_command_targeter.h" #include "mongo/db/commands.h" -#include "mongo/db/logical_session_cache.h" #include "mongo/db/namespace_string.h" #include "mongo/db/operation_context.h" #include "mongo/db/pipeline/aggregate_command_gen.h" @@ -46,6 +45,7 @@ #include "mongo/db/repl/optime.h" #include "mongo/db/repl/read_concern_args.h" #include "mongo/db/repl/repl_client_info.h" +#include "mongo/db/session/logical_session_cache.h" #include "mongo/db/vector_clock.h" #include "mongo/executor/network_interface.h" #include "mongo/logv2/log.h" diff --git a/src/mongo/s/commands/cluster_command_test_fixture.cpp b/src/mongo/s/commands/cluster_command_test_fixture.cpp index c31a6f61f23..171c1772e62 100644 --- a/src/mongo/s/commands/cluster_command_test_fixture.cpp +++ b/src/mongo/s/commands/cluster_command_test_fixture.cpp @@ -36,9 +36,9 @@ #include "mongo/db/commands/txn_cmds_gen.h" #include "mongo/db/keys_collection_client_sharded.h" #include "mongo/db/keys_collection_manager.h" -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/logical_time_validator.h" #include "mongo/db/read_write_concern_defaults.h" +#include "mongo/db/session/logical_session_cache_noop.h" #include "mongo/db/vector_clock.h" #include "mongo/s/commands/strategy.h" #include "mongo/util/fail_point.h" diff --git a/src/mongo/s/commands/cluster_hello_cmd.cpp b/src/mongo/s/commands/cluster_hello_cmd.cpp index 6842e81ca83..e1b01eed58b 100644 --- a/src/mongo/s/commands/cluster_hello_cmd.cpp +++ b/src/mongo/s/commands/cluster_hello_cmd.cpp @@ -36,11 +36,11 @@ #include "mongo/db/commands.h" #include "mongo/db/commands/test_commands_enabled.h" #include "mongo/db/curop.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/operation_context.h" #include "mongo/db/ops/write_ops.h" #include "mongo/db/repl/hello_auth.h" #include "mongo/db/repl/hello_gen.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/db/wire_version.h" #include "mongo/logv2/log.h" #include "mongo/rpc/metadata/client_metadata.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 ed002745735..7c87457f9a6 100644 --- a/src/mongo/s/commands/document_shard_key_update_util.h +++ b/src/mongo/s/commands/document_shard_key_update_util.h @@ -33,8 +33,8 @@ #include <string> #include <vector> -#include "mongo/db/logical_session_id.h" #include "mongo/db/ops/write_ops.h" +#include "mongo/db/session/logical_session_id.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/kill_sessions_remote.cpp b/src/mongo/s/commands/kill_sessions_remote.cpp index 571c0687fb8..0070b2c6493 100644 --- a/src/mongo/s/commands/kill_sessions_remote.cpp +++ b/src/mongo/s/commands/kill_sessions_remote.cpp @@ -33,8 +33,8 @@ #include "mongo/s/commands/kill_sessions_remote.h" #include "mongo/db/client.h" -#include "mongo/db/kill_sessions_common.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/kill_sessions_common.h" #include "mongo/executor/async_multicaster.h" #include "mongo/executor/task_executor_pool.h" #include "mongo/s/client/shard.h" diff --git a/src/mongo/s/commands/kill_sessions_remote.h b/src/mongo/s/commands/kill_sessions_remote.h index ef59d7769bd..04db4212946 100644 --- a/src/mongo/s/commands/kill_sessions_remote.h +++ b/src/mongo/s/commands/kill_sessions_remote.h @@ -29,7 +29,7 @@ #pragma once -#include "mongo/db/session_killer.h" +#include "mongo/db/session/session_killer.h" namespace mongo { diff --git a/src/mongo/s/commands/strategy.cpp b/src/mongo/s/commands/strategy.cpp index aa794fe35d9..e4d3993e61c 100644 --- a/src/mongo/s/commands/strategy.cpp +++ b/src/mongo/s/commands/strategy.cpp @@ -47,8 +47,6 @@ #include "mongo/db/curop.h" #include "mongo/db/error_labels.h" #include "mongo/db/initialize_api_parameters.h" -#include "mongo/db/initialize_operation_session_info.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/logical_time_validator.h" #include "mongo/db/matcher/extensions_callback_noop.h" #include "mongo/db/namespace_string.h" @@ -60,6 +58,8 @@ #include "mongo/db/query/query_request_helper.h" #include "mongo/db/read_write_concern_defaults.h" #include "mongo/db/repl/repl_server_parameters_gen.h" +#include "mongo/db/session/initialize_operation_session_info.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/db/stats/api_version_metrics.h" #include "mongo/db/stats/counters.h" #include "mongo/db/transaction_validation.h" diff --git a/src/mongo/s/load_balancer_support.h b/src/mongo/s/load_balancer_support.h index 59f4aae3c5d..4a59cb35c7a 100644 --- a/src/mongo/s/load_balancer_support.h +++ b/src/mongo/s/load_balancer_support.h @@ -29,8 +29,8 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/db/client.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/logical_session_id.h" namespace mongo::load_balancer_support { diff --git a/src/mongo/s/mongos_main.cpp b/src/mongo/s/mongos_main.cpp index c3419ae3262..cb586af6707 100644 --- a/src/mongo/s/mongos_main.cpp +++ b/src/mongo/s/mongos_main.cpp @@ -54,16 +54,16 @@ #include "mongo/db/dbdirectclient.h" #include "mongo/db/ftdc/ftdc_mongos.h" #include "mongo/db/initialize_server_global_state.h" -#include "mongo/db/kill_sessions.h" #include "mongo/db/log_process_details.h" -#include "mongo/db/logical_session_cache_impl.h" #include "mongo/db/logical_time_validator.h" #include "mongo/db/operation_context.h" #include "mongo/db/process_health/fault_manager.h" #include "mongo/db/server_options.h" #include "mongo/db/service_context.h" #include "mongo/db/service_liaison_mongos.h" -#include "mongo/db/session_killer.h" +#include "mongo/db/session/kill_sessions.h" +#include "mongo/db/session/logical_session_cache_impl.h" +#include "mongo/db/session/session_killer.h" #include "mongo/db/startup_warnings_common.h" #include "mongo/db/vector_clock_metadata_hook.h" #include "mongo/db/wire_version.h" diff --git a/src/mongo/s/query/SConscript b/src/mongo/s/query/SConscript index 3795c1ca144..d06f445235a 100644 --- a/src/mongo/s/query/SConscript +++ b/src/mongo/s/query/SConscript @@ -120,10 +120,10 @@ env.Library( '$BUILD_DIR/mongo/db/auth/authprivilege', '$BUILD_DIR/mongo/db/curop', '$BUILD_DIR/mongo/db/generic_cursor', - '$BUILD_DIR/mongo/db/kill_sessions', - '$BUILD_DIR/mongo/db/logical_session_cache', - '$BUILD_DIR/mongo/db/logical_session_id', '$BUILD_DIR/mongo/db/query/query_knobs', + '$BUILD_DIR/mongo/db/session/kill_sessions', + '$BUILD_DIR/mongo/db/session/logical_session_cache', + '$BUILD_DIR/mongo/db/session/logical_session_id', ], ) @@ -158,9 +158,9 @@ env.CppUnitTest( LIBDEPS=[ "$BUILD_DIR/mongo/db/auth/authmocks", "$BUILD_DIR/mongo/db/auth/saslauth", - "$BUILD_DIR/mongo/db/logical_session_id", "$BUILD_DIR/mongo/db/query/query_request", "$BUILD_DIR/mongo/db/query/query_test_service_context", + "$BUILD_DIR/mongo/db/session/logical_session_id", "$BUILD_DIR/mongo/db/shared_request_handling", "$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture", "$BUILD_DIR/mongo/s/sharding_router_test_fixture", diff --git a/src/mongo/s/query/async_results_merger_params.idl b/src/mongo/s/query/async_results_merger_params.idl index 2b5857e6c9b..6588058ffe2 100644 --- a/src/mongo/s/query/async_results_merger_params.idl +++ b/src/mongo/s/query/async_results_merger_params.idl @@ -34,7 +34,7 @@ global: - "mongo/db/query/cursor_response.h" imports: - - "mongo/db/logical_session_id.idl" + - "mongo/db/session/logical_session_id.idl" - "mongo/db/query/tailable_mode.idl" - "mongo/idl/basic_types.idl" - "mongo/util/net/hostandport.idl" diff --git a/src/mongo/s/query/blocking_results_merger.cpp b/src/mongo/s/query/blocking_results_merger.cpp index 6c6d622a041..34682ce8149 100644 --- a/src/mongo/s/query/blocking_results_merger.cpp +++ b/src/mongo/s/query/blocking_results_merger.cpp @@ -30,7 +30,7 @@ #include "mongo/platform/basic.h" #include "mongo/db/query/find_common.h" -#include "mongo/db/session_catalog_mongod.h" +#include "mongo/db/session/session_catalog_mongod.h" #include "mongo/db/transaction/transaction_participant.h" #include "mongo/s/query/blocking_results_merger.h" #include "mongo/util/scopeguard.h" diff --git a/src/mongo/s/query/cluster_client_cursor.h b/src/mongo/s/query/cluster_client_cursor.h index 8ff611eb308..57c2fa7d100 100644 --- a/src/mongo/s/query/cluster_client_cursor.h +++ b/src/mongo/s/query/cluster_client_cursor.h @@ -35,7 +35,7 @@ #include "mongo/db/api_parameters.h" #include "mongo/db/auth/user_name.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/s/query/cluster_client_cursor_params.h" #include "mongo/s/query/cluster_query_result.h" #include "mongo/s/query/router_exec_stage.h" diff --git a/src/mongo/s/query/cluster_client_cursor_mock.h b/src/mongo/s/query/cluster_client_cursor_mock.h index bc2991ecf89..6ebe399d644 100644 --- a/src/mongo/s/query/cluster_client_cursor_mock.h +++ b/src/mongo/s/query/cluster_client_cursor_mock.h @@ -33,7 +33,7 @@ #include <functional> #include <queue> -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/s/query/cluster_client_cursor.h" namespace mongo { diff --git a/src/mongo/s/query/cluster_cursor_manager.cpp b/src/mongo/s/query/cluster_cursor_manager.cpp index 4f6006141fc..cd20e940f6f 100644 --- a/src/mongo/s/query/cluster_cursor_manager.cpp +++ b/src/mongo/s/query/cluster_cursor_manager.cpp @@ -37,9 +37,9 @@ #include "mongo/db/allocate_cursor_id.h" #include "mongo/db/curop.h" -#include "mongo/db/kill_sessions_common.h" -#include "mongo/db/logical_session_cache.h" #include "mongo/db/query/query_knobs_gen.h" +#include "mongo/db/session/kill_sessions_common.h" +#include "mongo/db/session/logical_session_cache.h" #include "mongo/logv2/log.h" #include "mongo/util/clock_source.h" #include "mongo/util/str.h" diff --git a/src/mongo/s/query/cluster_cursor_manager.h b/src/mongo/s/query/cluster_cursor_manager.h index 730ccc40624..a0310697e0b 100644 --- a/src/mongo/s/query/cluster_cursor_manager.h +++ b/src/mongo/s/query/cluster_cursor_manager.h @@ -35,9 +35,9 @@ #include "mongo/db/cursor_id.h" #include "mongo/db/generic_cursor.h" -#include "mongo/db/kill_sessions.h" #include "mongo/db/namespace_string.h" -#include "mongo/db/session_killer.h" +#include "mongo/db/session/kill_sessions.h" +#include "mongo/db/session/session_killer.h" #include "mongo/platform/mutex.h" #include "mongo/platform/random.h" #include "mongo/s/query/cluster_client_cursor.h" diff --git a/src/mongo/s/query/cluster_cursor_manager_test.cpp b/src/mongo/s/query/cluster_cursor_manager_test.cpp index 58cd6bcdb02..3c1e9b49918 100644 --- a/src/mongo/s/query/cluster_cursor_manager_test.cpp +++ b/src/mongo/s/query/cluster_cursor_manager_test.cpp @@ -32,9 +32,9 @@ #include <memory> #include <vector> -#include "mongo/db/logical_session_cache_noop.h" #include "mongo/db/operation_context.h" #include "mongo/db/service_context_test_fixture.h" +#include "mongo/db/session/logical_session_cache_noop.h" #include "mongo/s/concurrency/locker_mongos_client_observer.h" #include "mongo/s/query/cluster_client_cursor_mock.h" #include "mongo/s/query/cluster_cursor_manager.h" diff --git a/src/mongo/s/service_entry_point_mongos.cpp b/src/mongo/s/service_entry_point_mongos.cpp index 38a3710189b..dde6e937ca4 100644 --- a/src/mongo/s/service_entry_point_mongos.cpp +++ b/src/mongo/s/service_entry_point_mongos.cpp @@ -43,7 +43,7 @@ #include "mongo/db/operation_context.h" #include "mongo/db/request_execution_context.h" #include "mongo/db/service_context.h" -#include "mongo/db/session_catalog.h" +#include "mongo/db/session/session_catalog.h" #include "mongo/db/stats/counters.h" #include "mongo/logv2/log.h" #include "mongo/rpc/check_allowed_op_query_cmd.h" diff --git a/src/mongo/s/session_catalog_router.cpp b/src/mongo/s/session_catalog_router.cpp index 46c011b40bf..e89d8f8b860 100644 --- a/src/mongo/s/session_catalog_router.cpp +++ b/src/mongo/s/session_catalog_router.cpp @@ -32,7 +32,7 @@ #include "mongo/s/session_catalog_router.h" -#include "mongo/db/sessions_collection.h" +#include "mongo/db/session/sessions_collection.h" #include "mongo/s/transaction_router.h" #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding diff --git a/src/mongo/s/session_catalog_router.h b/src/mongo/s/session_catalog_router.h index ecb4771d3c7..37b5734bc02 100644 --- a/src/mongo/s/session_catalog_router.h +++ b/src/mongo/s/session_catalog_router.h @@ -29,7 +29,7 @@ #pragma once -#include "mongo/db/session_catalog.h" +#include "mongo/db/session/session_catalog.h" namespace mongo { diff --git a/src/mongo/s/sessions_collection_sharded.cpp b/src/mongo/s/sessions_collection_sharded.cpp index 8fc8183fbd5..c45c0d7a973 100644 --- a/src/mongo/s/sessions_collection_sharded.cpp +++ b/src/mongo/s/sessions_collection_sharded.cpp @@ -35,7 +35,7 @@ #include "mongo/db/operation_context.h" #include "mongo/db/query/canonical_query.h" #include "mongo/db/query/query_request_helper.h" -#include "mongo/db/sessions_collection_rs.h" +#include "mongo/db/session/sessions_collection_rs.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/rpc/op_msg.h" #include "mongo/rpc/op_msg_rpc_impls.h" diff --git a/src/mongo/s/sessions_collection_sharded.h b/src/mongo/s/sessions_collection_sharded.h index c43c1b67fa6..1bb383e25f9 100644 --- a/src/mongo/s/sessions_collection_sharded.h +++ b/src/mongo/s/sessions_collection_sharded.h @@ -31,8 +31,8 @@ #include <memory> -#include "mongo/db/logical_session_id.h" -#include "mongo/db/sessions_collection.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/sessions_collection.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/s/sessions_collection_sharded_test.cpp b/src/mongo/s/sessions_collection_sharded_test.cpp index 011821aa131..023ccf627be 100644 --- a/src/mongo/s/sessions_collection_sharded_test.cpp +++ b/src/mongo/s/sessions_collection_sharded_test.cpp @@ -33,7 +33,7 @@ #include "mongo/client/remote_command_targeter_factory_mock.h" #include "mongo/client/remote_command_targeter_mock.h" #include "mongo/db/commands.h" -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/s/catalog/type_shard.h" #include "mongo/s/catalog_cache_test_fixture.h" #include "mongo/s/client/shard_registry.h" diff --git a/src/mongo/s/transaction_router.cpp b/src/mongo/s/transaction_router.cpp index f2ab920aacc..62f5da00cf2 100644 --- a/src/mongo/s/transaction_router.cpp +++ b/src/mongo/s/transaction_router.cpp @@ -41,8 +41,8 @@ #include "mongo/db/commands/txn_two_phase_commit_cmds_gen.h" #include "mongo/db/internal_transactions_feature_flag_gen.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/repl/read_concern_args.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/db/transaction_validation.h" #include "mongo/db/txn_retry_counter_too_old_info.h" #include "mongo/db/vector_clock.h" diff --git a/src/mongo/s/transaction_router.h b/src/mongo/s/transaction_router.h index a7b49c5eb12..09af7b2e788 100644 --- a/src/mongo/s/transaction_router.h +++ b/src/mongo/s/transaction_router.h @@ -33,10 +33,10 @@ #include "mongo/db/api_parameters.h" #include "mongo/db/commands/txn_cmds_gen.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/operation_context.h" #include "mongo/db/repl/read_concern_args.h" -#include "mongo/db/session_catalog.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/session_catalog.h" #include "mongo/db/stats/single_transaction_stats.h" #include "mongo/s/async_requests_sender.h" #include "mongo/s/client/shard.h" diff --git a/src/mongo/s/transaction_router_resource_yielder.cpp b/src/mongo/s/transaction_router_resource_yielder.cpp index a5bfea59878..16dd6f1b2b3 100644 --- a/src/mongo/s/transaction_router_resource_yielder.cpp +++ b/src/mongo/s/transaction_router_resource_yielder.cpp @@ -29,7 +29,7 @@ #include "mongo/s/transaction_router_resource_yielder.h" -#include "mongo/db/session_catalog.h" +#include "mongo/db/session/session_catalog.h" #include "mongo/logv2/log.h" #include "mongo/s/is_mongos.h" #include "mongo/s/session_catalog_router.h" diff --git a/src/mongo/s/write_ops/batch_write_exec.cpp b/src/mongo/s/write_ops/batch_write_exec.cpp index a71af6b6787..3158ecf274d 100644 --- a/src/mongo/s/write_ops/batch_write_exec.cpp +++ b/src/mongo/s/write_ops/batch_write_exec.cpp @@ -38,7 +38,7 @@ #include "mongo/client/connection_string.h" #include "mongo/client/remote_command_targeter.h" #include "mongo/db/error_labels.h" -#include "mongo/db/logical_session_id_helpers.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/executor/task_executor_pool.h" #include "mongo/logv2/log.h" #include "mongo/s/client/shard_registry.h" diff --git a/src/mongo/s/write_ops/batch_write_exec_test.cpp b/src/mongo/s/write_ops/batch_write_exec_test.cpp index aba9c8367c2..52fe7c41763 100644 --- a/src/mongo/s/write_ops/batch_write_exec_test.cpp +++ b/src/mongo/s/write_ops/batch_write_exec_test.cpp @@ -31,7 +31,7 @@ #include "mongo/client/remote_command_targeter_factory_mock.h" #include "mongo/client/remote_command_targeter_mock.h" #include "mongo/db/commands.h" -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/db/vector_clock.h" #include "mongo/s/catalog/type_shard.h" #include "mongo/s/client/shard_registry.h" diff --git a/src/mongo/s/write_ops/batch_write_op.h b/src/mongo/s/write_ops/batch_write_op.h index d76072ca24b..527d5810db5 100644 --- a/src/mongo/s/write_ops/batch_write_op.h +++ b/src/mongo/s/write_ops/batch_write_op.h @@ -34,7 +34,7 @@ #include <vector> #include "mongo/base/status.h" -#include "mongo/db/logical_session_id.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/rpc/write_concern_error_detail.h" #include "mongo/s/ns_targeter.h" #include "mongo/s/write_ops/batched_command_request.h" diff --git a/src/mongo/s/write_ops/batched_command_response.h b/src/mongo/s/write_ops/batched_command_response.h index 8e369e18e50..e1d9f2cb224 100644 --- a/src/mongo/s/write_ops/batched_command_response.h +++ b/src/mongo/s/write_ops/batched_command_response.h @@ -31,9 +31,9 @@ #include "mongo/base/string_data.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/ops/write_ops.h" #include "mongo/db/repl/optime.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/rpc/write_concern_error_detail.h" #include "mongo/s/write_ops/batched_upsert_detail.h" diff --git a/src/mongo/scripting/mozjs/mongo.cpp b/src/mongo/scripting/mozjs/mongo.cpp index 36f8e4a2301..cf828514c1b 100644 --- a/src/mongo/scripting/mozjs/mongo.cpp +++ b/src/mongo/scripting/mozjs/mongo.cpp @@ -40,10 +40,10 @@ #include "mongo/client/global_conn_pool.h" #include "mongo/client/mongo_uri.h" #include "mongo/client/replica_set_monitor.h" -#include "mongo/db/logical_session_id.h" -#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/namespace_string.h" #include "mongo/db/operation_context.h" +#include "mongo/db/session/logical_session_id.h" +#include "mongo/db/session/logical_session_id_helpers.h" #include "mongo/scripting/dbdirectclient_factory.h" #include "mongo/scripting/mozjs/cursor.h" #include "mongo/scripting/mozjs/implscope.h" diff --git a/src/mongo/shell/SConscript b/src/mongo/shell/SConscript index f3a29777a46..70c3380f64a 100644 --- a/src/mongo/shell/SConscript +++ b/src/mongo/shell/SConscript @@ -19,7 +19,7 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/client/clientdriver_minimal', - '$BUILD_DIR/mongo/db/logical_session_id', + '$BUILD_DIR/mongo/db/session/logical_session_id', '$BUILD_DIR/mongo/scripting/bson_template_evaluator', ], LIBDEPS_PRIVATE=[ @@ -255,12 +255,12 @@ if not has_option('noshell') and jsEngine: "$BUILD_DIR/mongo/client/clientdriver_network", "$BUILD_DIR/mongo/client/connection_string", "$BUILD_DIR/mongo/db/catalog/index_key_validate", - "$BUILD_DIR/mongo/db/logical_session_id_helpers", "$BUILD_DIR/mongo/db/mongohasher", "$BUILD_DIR/mongo/db/pipeline/change_stream_error_extra_info", "$BUILD_DIR/mongo/db/query/command_request_response", "$BUILD_DIR/mongo/db/query/query_request", "$BUILD_DIR/mongo/db/server_options_core", + "$BUILD_DIR/mongo/db/session/logical_session_id_helpers", "$BUILD_DIR/mongo/db/storage/duplicate_key_error_info", "$BUILD_DIR/mongo/db/traffic_reader", "$BUILD_DIR/mongo/db/views/resolved_view", diff --git a/src/mongo/shell/bench.h b/src/mongo/shell/bench.h index 90831a8ab53..053de58fd17 100644 --- a/src/mongo/shell/bench.h +++ b/src/mongo/shell/bench.h @@ -34,8 +34,8 @@ #include "mongo/client/dbclient_base.h" #include "mongo/db/jsobj.h" -#include "mongo/db/logical_session_id.h" #include "mongo/db/ops/write_ops.h" +#include "mongo/db/session/logical_session_id.h" #include "mongo/platform/atomic_word.h" #include "mongo/platform/mutex.h" #include "mongo/stdx/condition_variable.h" |