diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2023-01-16 20:45:40 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-01-16 21:25:48 +0000 |
commit | a202eb99b9b97dec0897a65fee21915185e1efdc (patch) | |
tree | 27307c4e7e512104ee5d4ed5aeae7dca7a334364 /src/mongo | |
parent | 68835d4316db615702c99d1cd45a3fb0fb12217f (diff) | |
download | mongo-a202eb99b9b97dec0897a65fee21915185e1efdc.tar.gz |
Revert "SERVER-72735 Revert commits while investigating root cause"
Revert "SERVER-72735 Make 'collection' dependent on 'sharding_api_d'"
This reverts commit d6b3993fcfc68d66fef6a25b268e0146e461857c.
Revert "SERVER-72735 Move range_deletion_task.idl out of sharding_api_d"
This reverts commit 3df82389e1a092738ef77bcf73a9ed60bbe6d55e.
Revert "SERVER-72735 Move sharding_expressions.h/.cpp out of sharding_api_d"
This reverts commit b9be9c29911c18171a639e2d4bb95bc46b9dbb81.
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/catalog/SConscript | 5 | ||||
-rw-r--r-- | src/mongo/db/index/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/db/op_observer/SConscript | 37 | ||||
-rw-r--r-- | src/mongo/db/s/SConscript | 46 | ||||
-rw-r--r-- | src/mongo/db/s/migration_chunk_cloner_source_legacy_bm.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/s/sharding_expressions.cpp | 8 | ||||
-rw-r--r-- | src/mongo/db/s/sharding_expressions.h | 5 | ||||
-rw-r--r-- | src/mongo/db/session/SConscript | 8 | ||||
-rw-r--r-- | src/mongo/s/SConscript | 10 | ||||
-rw-r--r-- | src/mongo/s/chunk_manager_refresh_bm.cpp (renamed from src/mongo/db/s/chunk_manager_refresh_bm.cpp) | 0 |
10 files changed, 64 insertions, 60 deletions
diff --git a/src/mongo/db/catalog/SConscript b/src/mongo/db/catalog/SConscript index b79fae26381..15ec840ee0b 100644 --- a/src/mongo/db/catalog/SConscript +++ b/src/mongo/db/catalog/SConscript @@ -242,11 +242,8 @@ env.Library( 'collection.cpp', 'collection_operation_source.cpp', ], - LIBDEPS=[ - '$BUILD_DIR/mongo/db/s/sharding_api_d', - ], LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/db/server_base', + '$BUILD_DIR/mongo/base', ], ) diff --git a/src/mongo/db/index/SConscript b/src/mongo/db/index/SConscript index 0795d88a76c..c2edbd467e5 100644 --- a/src/mongo/db/index/SConscript +++ b/src/mongo/db/index/SConscript @@ -28,6 +28,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/bson/dotted_path_support', + '$BUILD_DIR/mongo/db/catalog/collection', '$BUILD_DIR/mongo/db/exec/projection_executor', '$BUILD_DIR/mongo/db/exec/working_set', '$BUILD_DIR/mongo/db/fts/base_fts', diff --git a/src/mongo/db/op_observer/SConscript b/src/mongo/db/op_observer/SConscript index 072f19bba74..0cc24202ca6 100644 --- a/src/mongo/db/op_observer/SConscript +++ b/src/mongo/db/op_observer/SConscript @@ -5,9 +5,9 @@ Import("env") env = env.Clone() env.Library( - target='op_observer', + target="op_observer", source=[ - 'op_observer.cpp', + "op_observer.cpp", ], LIBDEPS=[ '$BUILD_DIR/mongo/base', @@ -15,16 +15,19 @@ env.Library( ) env.Library( - target='op_observer_util', + target="op_observer_util", source=[ - 'op_observer_util.cpp', + "op_observer_util.cpp", ], - LIBDEPS_PRIVATE=[ + LIBDEPS=[ '$BUILD_DIR/mongo/base', + ], + LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/bson/dotted_path_support', '$BUILD_DIR/mongo/db/catalog/collection', '$BUILD_DIR/mongo/db/catalog/collection_options', '$BUILD_DIR/mongo/db/index/index_descriptor', + '$BUILD_DIR/mongo/db/s/sharding_api_d', ], ) @@ -56,17 +59,15 @@ env.Library( 'batched_write_context.cpp', ], LIBDEPS=[ - 'op_observer', + '$BUILD_DIR/mongo/db/change_stream_pre_images_collection_manager', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/catalog/collection', '$BUILD_DIR/mongo/db/catalog/collection_catalog', '$BUILD_DIR/mongo/db/catalog/collection_options', '$BUILD_DIR/mongo/db/catalog/commit_quorum_options', '$BUILD_DIR/mongo/db/catalog/database_holder', '$BUILD_DIR/mongo/db/catalog/import_collection_oplog_entry', - '$BUILD_DIR/mongo/db/change_stream_pre_images_collection_manager', '$BUILD_DIR/mongo/db/commands/txn_cmd_request', '$BUILD_DIR/mongo/db/concurrency/exception_util', '$BUILD_DIR/mongo/db/dbhelpers', @@ -77,6 +78,7 @@ env.Library( '$BUILD_DIR/mongo/db/repl/image_collection_entry', '$BUILD_DIR/mongo/db/repl/repl_server_parameters', '$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/session_catalog', '$BUILD_DIR/mongo/db/session/session_catalog_mongod', @@ -88,39 +90,37 @@ env.Library( '$BUILD_DIR/mongo/db/views/view_catalog_helpers', '$BUILD_DIR/mongo/s/coreshard', '$BUILD_DIR/mongo/s/grid', + 'op_observer', 'op_observer_util', ], ) env.Library( - target='fcv_op_observer', + target="fcv_op_observer", source=[ - 'fcv_op_observer.cpp', - ], - LIBDEPS=[ - 'op_observer', + "fcv_op_observer.cpp", ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/commands/mongod_fcv', '$BUILD_DIR/mongo/db/session/kill_sessions_local', '$BUILD_DIR/mongo/executor/egress_tag_closer_manager', + 'op_observer', 'op_observer_util', ], ) env.Library( - target='user_write_block_mode_op_observer', + target="user_write_block_mode_op_observer", source=[ - 'user_write_block_mode_op_observer.cpp', + "user_write_block_mode_op_observer.cpp", ], LIBDEPS=[ + '$BUILD_DIR/mongo/base', 'op_observer', ], LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/catalog/collection', - '$BUILD_DIR/mongo/db/concurrency/lock_manager', + '$BUILD_DIR/mongo/db/s/sharding_api_d', '$BUILD_DIR/mongo/db/s/user_writes_recoverable_critical_section', ], ) @@ -140,7 +140,6 @@ env.CppUnitTest( '$BUILD_DIR/mongo/db/catalog/collection', '$BUILD_DIR/mongo/db/catalog/import_collection_oplog_entry', '$BUILD_DIR/mongo/db/catalog/local_oplog_info', - '$BUILD_DIR/mongo/db/change_stream_pre_images_collection_manager', '$BUILD_DIR/mongo/db/commands/create_command', '$BUILD_DIR/mongo/db/concurrency/exception_util', '$BUILD_DIR/mongo/db/dbdirectclient', diff --git a/src/mongo/db/s/SConscript b/src/mongo/db/s/SConscript index f7254a8487e..0056e40cbee 100644 --- a/src/mongo/db/s/SConscript +++ b/src/mongo/db/s/SConscript @@ -17,8 +17,10 @@ env.Library( 'database_sharding_state.cpp', 'global_user_write_block_state.cpp', 'operation_sharding_state.cpp', + 'range_deletion_task.idl', 'shard_key_index_util.cpp', 'sharding_api_d_params.idl', + 'sharding_expressions.cpp', 'sharding_migration_critical_section.cpp', 'sharding_state.cpp', 'sharding_statistics.cpp', @@ -33,6 +35,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/catalog/index_catalog', + '$BUILD_DIR/mongo/db/catalog/index_key_validate', '$BUILD_DIR/mongo/db/concurrency/lock_manager', '$BUILD_DIR/mongo/db/index/index_descriptor', '$BUILD_DIR/mongo/db/server_base', @@ -72,12 +75,12 @@ env.Library( ) env.Library( - target='query_analysis_writer', + target="query_analysis_writer", source=[ - 'query_analysis_writer.cpp', + "query_analysis_writer.cpp", ], LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/db/dbdirectclient', + "$BUILD_DIR/mongo/db/dbdirectclient", '$BUILD_DIR/mongo/db/ops/write_ops_parsers', '$BUILD_DIR/mongo/db/server_base', '$BUILD_DIR/mongo/db/service_context', @@ -102,13 +105,13 @@ env.Library( 'commit_chunk_migration.idl', 'config_server_op_observer.cpp', 'global_index/common_types.idl', - 'global_index/global_index_cloner.idl', 'global_index/global_index_cloner_fetcher.cpp', 'global_index/global_index_cloner_fetcher_factory.cpp', + 'global_index/global_index_cloner.idl', 'global_index/global_index_cloning_external_state.cpp', 'global_index/global_index_cloning_service.cpp', - 'global_index/global_index_cumulative_metrics.cpp', 'global_index/global_index_cumulative_metrics_field_name_provider.cpp', + 'global_index/global_index_cumulative_metrics.cpp', 'global_index/global_index_inserter.cpp', 'global_index/global_index_metrics.cpp', 'global_index/global_index_metrics_field_name_provider.cpp', @@ -119,10 +122,10 @@ env.Library( 'migration_batch_fetcher.cpp', 'migration_batch_inserter.cpp', 'migration_chunk_cloner_source.cpp', - 'migration_coordinator.cpp', 'migration_coordinator_document.idl', - 'migration_destination_manager.cpp', 'migration_recipient_recovery_document.idl', + 'migration_coordinator.cpp', + 'migration_destination_manager.cpp', 'migration_session_id.cpp', 'migration_source_manager.cpp', 'migration_util.cpp', @@ -136,9 +139,9 @@ env.Library( 'query_analysis_op_observer.cpp', 'range_deleter_service.cpp', 'range_deleter_service_op_observer.cpp', - 'range_deletion_task.idl', 'range_deletion_util.cpp', 'read_only_catalog_cache_loader.cpp', + 'sharding_recovery_service.cpp', 'resharding/coordinator_document.idl', 'resharding/document_source_resharding_add_resume_id.cpp', 'resharding/document_source_resharding_iterate_transaction.cpp', @@ -151,8 +154,8 @@ env.Library( 'resharding/resharding_coordinator_commit_monitor.cpp', 'resharding/resharding_coordinator_observer.cpp', 'resharding/resharding_coordinator_service.cpp', - 'resharding/resharding_cumulative_metrics.cpp', 'resharding/resharding_cumulative_metrics_field_name_provider.cpp', + 'resharding/resharding_cumulative_metrics.cpp', 'resharding/resharding_data_copy_util.cpp', 'resharding/resharding_data_replication.cpp', 'resharding/resharding_donor_oplog_iterator.cpp', @@ -160,14 +163,14 @@ env.Library( 'resharding/resharding_donor_service.cpp', 'resharding/resharding_future_util.cpp', 'resharding/resharding_manual_cleanup.cpp', + 'resharding/resharding_metrics_helpers.cpp', 'resharding/resharding_metrics.cpp', 'resharding/resharding_metrics_field_name_provider.cpp', - 'resharding/resharding_metrics_helpers.cpp', 'resharding/resharding_op_observer.cpp', - 'resharding/resharding_oplog_application.cpp', 'resharding/resharding_oplog_applier.cpp', 'resharding/resharding_oplog_applier_metrics.cpp', 'resharding/resharding_oplog_applier_progress.idl', + 'resharding/resharding_oplog_application.cpp', 'resharding/resharding_oplog_batch_applier.cpp', 'resharding/resharding_oplog_batch_preparer.cpp', 'resharding/resharding_oplog_fetcher.cpp', @@ -189,15 +192,13 @@ env.Library( 'shard_metadata_util.cpp', 'shard_server_catalog_cache_loader.cpp', 'shard_server_op_observer.cpp', - 'sharding_data_transform_cumulative_metrics.cpp', + 'sharding_data_transform_metrics.cpp', 'sharding_data_transform_cumulative_metrics_field_name_provider.cpp', + 'sharding_data_transform_cumulative_metrics.cpp', 'sharding_data_transform_instance_metrics.cpp', - 'sharding_data_transform_instance_metrics_field_name_provider.cpp', - 'sharding_data_transform_metrics.cpp', 'sharding_data_transform_metrics_observer.cpp', - 'sharding_expressions.cpp', + 'sharding_data_transform_instance_metrics_field_name_provider.cpp', 'sharding_initialization_mongod.cpp', - 'sharding_recovery_service.cpp', 'sharding_runtime_d_params.idl', 'sharding_state_recovery.cpp', 'split_chunk.cpp', @@ -240,7 +241,6 @@ env.Library( '$BUILD_DIR/mongo/db/catalog/catalog_helpers', '$BUILD_DIR/mongo/db/catalog/collection_crud', '$BUILD_DIR/mongo/db/catalog/database_holder', - '$BUILD_DIR/mongo/db/catalog/index_key_validate', '$BUILD_DIR/mongo/db/index_builds_coordinator_interface', '$BUILD_DIR/mongo/db/keys_collection_client_direct', '$BUILD_DIR/mongo/db/ops/write_ops', @@ -852,16 +852,6 @@ env.CppUnitTest( ) env.Benchmark( - target='chunk_manager_refresh_bm', - source=[ - 'chunk_manager_refresh_bm.cpp', - ], - LIBDEPS=[ - 'sharding_api_d', - ], -) - -env.Benchmark( target='migration_chunk_cloner_source_legacy_bm', source=[ 'migration_chunk_cloner_source_legacy_bm.cpp', @@ -880,9 +870,9 @@ env.Benchmark( ], LIBDEPS=[ '$BUILD_DIR/mongo/db/auth/authmocks', - '$BUILD_DIR/mongo/db/auth/authorization_manager_global', '$BUILD_DIR/mongo/s/grid', '$BUILD_DIR/mongo/s/sharding_test_fixture_common', + 'sharding_api_d', 'sharding_runtime_d', ], ) diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy_bm.cpp b/src/mongo/db/s/migration_chunk_cloner_source_legacy_bm.cpp index 23278638a19..f69eac4a700 100644 --- a/src/mongo/db/s/migration_chunk_cloner_source_legacy_bm.cpp +++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy_bm.cpp @@ -27,9 +27,11 @@ * it in the license file. */ +#include "mongo/platform/basic.h" + #include <benchmark/benchmark.h> -#include "mongo/db/s/migration_chunk_cloner_source.h" +#include "migration_chunk_cloner_source.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_expressions.cpp b/src/mongo/db/s/sharding_expressions.cpp index 3bdff8d652c..e1e5309fec1 100644 --- a/src/mongo/db/s/sharding_expressions.cpp +++ b/src/mongo/db/s/sharding_expressions.cpp @@ -27,6 +27,8 @@ * it in the license file. */ +#include "mongo/platform/basic.h" + #include "mongo/db/s/sharding_expressions.h" #include "mongo/client/index_spec.h" @@ -52,7 +54,6 @@ namespace mongo { namespace { - /** * The class IndexKeysObjectsGenerator is used to generate the index keys objects for the provided * document 'docObj' and the index descriptor 'indexDescriptor'. This class determines the index @@ -248,7 +249,7 @@ private: recordId); } - /** + /* * Generates the key string for the 'wildcard' index type and adds them to the 'keyStrings'. */ void _generateWildcardIndexKeys(KeyStringSet* keyStrings) const { @@ -358,7 +359,6 @@ private: // The ordering to be used for generating the key strings. const Ordering _ordering = Ordering::allAscending(); }; - } // namespace Value ExpressionInternalOwningShard::evaluate(const Document& root, Variables* variables) const { @@ -500,4 +500,4 @@ Value ExpressionInternalIndexKey::evaluate(const Document& root, Variables* vari REGISTER_STABLE_EXPRESSION(_internalOwningShard, ExpressionInternalOwningShard::parse); REGISTER_STABLE_EXPRESSION(_internalIndexKey, ExpressionInternalIndexKey::parse); -} // namespace mongo +}; // namespace mongo diff --git a/src/mongo/db/s/sharding_expressions.h b/src/mongo/db/s/sharding_expressions.h index e46218132a8..021e608d9f5 100644 --- a/src/mongo/db/s/sharding_expressions.h +++ b/src/mongo/db/s/sharding_expressions.h @@ -29,6 +29,8 @@ #pragma once +#include "mongo/platform/basic.h" + #include "mongo/db/exec/document_value/document.h" #include "mongo/db/exec/document_value/value.h" #include "mongo/db/index/index_descriptor.h" @@ -155,5 +157,4 @@ private: boost::intrusive_ptr<Expression> _doc; boost::intrusive_ptr<Expression> _spec; }; - -} // namespace mongo +}; // namespace mongo diff --git a/src/mongo/db/session/SConscript b/src/mongo/db/session/SConscript index a2e78cd9ec6..a0021e3ac81 100644 --- a/src/mongo/db/session/SConscript +++ b/src/mongo/db/session/SConscript @@ -128,8 +128,9 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/db/service_liaison', - 'kill_sessions', + '$BUILD_DIR/mongo/db/session/kill_sessions', 'logical_session_cache', + 'logical_session_id', 'logical_session_id_helpers', 'sessions_collection', ], @@ -147,12 +148,15 @@ env.Library( '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/db/auth/user', - '$BUILD_DIR/mongo/db/server_base', + '$BUILD_DIR/mongo/idl/idl_parser', '$BUILD_DIR/mongo/rpc/client_metadata', 'logical_session_id_helpers', ], diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript index 0127195f36c..c6b68343de9 100644 --- a/src/mongo/s/SConscript +++ b/src/mongo/s/SConscript @@ -352,6 +352,16 @@ env.Library( ], ) +env.Benchmark( + target='chunk_manager_refresh_bm', + source=[ + 'chunk_manager_refresh_bm.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/s/sharding_api_d', + ], +) + env.Library( target='is_mongos', source=[ diff --git a/src/mongo/db/s/chunk_manager_refresh_bm.cpp b/src/mongo/s/chunk_manager_refresh_bm.cpp index 8e18a5e3e51..8e18a5e3e51 100644 --- a/src/mongo/db/s/chunk_manager_refresh_bm.cpp +++ b/src/mongo/s/chunk_manager_refresh_bm.cpp |