diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2020-02-20 16:05:48 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-21 20:12:44 +0000 |
commit | 0f7625b5cdbc24ed0fce1e168059118cb025d869 (patch) | |
tree | 3ea90b71ed2510e220140626b351f6e998d2d8b7 /src/mongo/db/s | |
parent | 3463ea25afcbf2c07b96f043904961b5c0f04474 (diff) | |
download | mongo-0f7625b5cdbc24ed0fce1e168059118cb025d869.tar.gz |
SERVER-45567 removing util/log.h where I can
o converting some log lines that were missed
o fixing some missing includes
create mode 100644 src/mongo/transport/ismaster_metrics.cpp
Diffstat (limited to 'src/mongo/db/s')
100 files changed, 102 insertions, 144 deletions
diff --git a/src/mongo/db/s/active_shard_collection_registry_test.cpp b/src/mongo/db/s/active_shard_collection_registry_test.cpp index 86d5268513c..6aed719ded2 100644 --- a/src/mongo/db/s/active_shard_collection_registry_test.cpp +++ b/src/mongo/db/s/active_shard_collection_registry_test.cpp @@ -36,7 +36,6 @@ #include "mongo/db/service_context_d_test_fixture.h" #include "mongo/s/request_types/shard_collection_gen.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/add_shard_cmd.cpp b/src/mongo/db/s/add_shard_cmd.cpp index 3d0e43ea33c..c2e8e3684a2 100644 --- a/src/mongo/db/s/add_shard_cmd.cpp +++ b/src/mongo/db/s/add_shard_cmd.cpp @@ -43,7 +43,6 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/balancer_configuration.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/balancer/balancer.cpp b/src/mongo/db/s/balancer/balancer.cpp index 212b6d79713..5c4b267034f 100644 --- a/src/mongo/db/s/balancer/balancer.cpp +++ b/src/mongo/db/s/balancer/balancer.cpp @@ -57,7 +57,6 @@ #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/exit.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/timer.h" #include "mongo/util/version.h" diff --git a/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp index 9f50b4f5169..5b18930c30b 100644 --- a/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp +++ b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp @@ -46,7 +46,6 @@ #include "mongo/s/catalog/type_tags.h" #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/balancer/balancer_policy.cpp b/src/mongo/db/s/balancer/balancer_policy.cpp index 44e3f1302b5..3fc275c2d33 100644 --- a/src/mongo/db/s/balancer/balancer_policy.cpp +++ b/src/mongo/db/s/balancer/balancer_policy.cpp @@ -40,7 +40,6 @@ #include "mongo/s/catalog/type_shard.h" #include "mongo/s/catalog/type_tags.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/balancer/balancer_policy_test.cpp b/src/mongo/db/s/balancer/balancer_policy_test.cpp index d7b82b2240a..4ca3a5b185b 100644 --- a/src/mongo/db/s/balancer/balancer_policy_test.cpp +++ b/src/mongo/db/s/balancer/balancer_policy_test.cpp @@ -36,7 +36,6 @@ #include "mongo/platform/random.h" #include "mongo/s/catalog/type_chunk.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/balancer/cluster_statistics_impl.cpp b/src/mongo/db/s/balancer/cluster_statistics_impl.cpp index 73e47dd5c9d..ec0f946299e 100644 --- a/src/mongo/db/s/balancer/cluster_statistics_impl.cpp +++ b/src/mongo/db/s/balancer/cluster_statistics_impl.cpp @@ -43,7 +43,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/shard_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/balancer/migration_manager.cpp b/src/mongo/db/s/balancer/migration_manager.cpp index a14202c643d..4a1d614d34d 100644 --- a/src/mongo/db/s/balancer/migration_manager.cpp +++ b/src/mongo/db/s/balancer/migration_manager.cpp @@ -50,7 +50,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/move_chunk_request.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/scopeguard.h" diff --git a/src/mongo/db/s/balancer/migration_test_fixture.h b/src/mongo/db/s/balancer/migration_test_fixture.h index 56757bc96df..cc823fb701f 100644 --- a/src/mongo/db/s/balancer/migration_test_fixture.h +++ b/src/mongo/db/s/balancer/migration_test_fixture.h @@ -44,7 +44,6 @@ #include "mongo/s/catalog/type_tags.h" #include "mongo/s/config_server_test_fixture.h" #include "mongo/s/database_version_helpers.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/balancer/scoped_migration_request.cpp b/src/mongo/db/s/balancer/scoped_migration_request.cpp index b06cb1fa9f0..f44956aff83 100644 --- a/src/mongo/db/s/balancer/scoped_migration_request.cpp +++ b/src/mongo/db/s/balancer/scoped_migration_request.cpp @@ -38,7 +38,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/check_sharding_index_command.cpp b/src/mongo/db/s/check_sharding_index_command.cpp index 87a682d941b..90982427c82 100644 --- a/src/mongo/db/s/check_sharding_index_command.cpp +++ b/src/mongo/db/s/check_sharding_index_command.cpp @@ -37,7 +37,6 @@ #include "mongo/db/catalog_raii.h" #include "mongo/db/commands.h" #include "mongo/db/keypattern.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/chunk_move_write_concern_options.cpp b/src/mongo/db/s/chunk_move_write_concern_options.cpp index 66966957437..44c32327eff 100644 --- a/src/mongo/db/s/chunk_move_write_concern_options.cpp +++ b/src/mongo/db/s/chunk_move_write_concern_options.cpp @@ -38,7 +38,6 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/service_context.h" #include "mongo/s/request_types/migration_secondary_throttle_options.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/chunk_splitter.cpp b/src/mongo/db/s/chunk_splitter.cpp index 3c420e838fb..9a918df0e93 100644 --- a/src/mongo/db/s/chunk_splitter.cpp +++ b/src/mongo/db/s/chunk_splitter.cpp @@ -53,7 +53,6 @@ #include "mongo/s/grid.h" #include "mongo/s/shard_key_pattern.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/cleanup_orphaned_cmd.cpp b/src/mongo/db/s/cleanup_orphaned_cmd.cpp index b7b565f6726..1e828c97ac7 100644 --- a/src/mongo/db/s/cleanup_orphaned_cmd.cpp +++ b/src/mongo/db/s/cleanup_orphaned_cmd.cpp @@ -50,7 +50,6 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" #include "mongo/s/request_types/migration_secondary_throttle_options.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/clone_catalog_data_command.cpp b/src/mongo/db/s/clone_catalog_data_command.cpp index dda7e8e7485..2581d0ccfbe 100644 --- a/src/mongo/db/s/clone_catalog_data_command.cpp +++ b/src/mongo/db/s/clone_catalog_data_command.cpp @@ -41,7 +41,6 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/clone_catalog_data_gen.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/clone_collection_options_from_primary_shard_cmd.cpp b/src/mongo/db/s/clone_collection_options_from_primary_shard_cmd.cpp index 7f7439ae15b..5f89314594a 100644 --- a/src/mongo/db/s/clone_collection_options_from_primary_shard_cmd.cpp +++ b/src/mongo/db/s/clone_collection_options_from_primary_shard_cmd.cpp @@ -37,7 +37,6 @@ #include "mongo/db/s/shard_filtering_metadata_refresh.h" #include "mongo/s/request_types/clone_collection_options_from_primary_shard_gen.h" #include "mongo/s/shard_id.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/collection_metadata.cpp b/src/mongo/db/s/collection_metadata.cpp index aca45d987ae..0738c4e1cee 100644 --- a/src/mongo/db/s/collection_metadata.cpp +++ b/src/mongo/db/s/collection_metadata.cpp @@ -39,7 +39,6 @@ #include "mongo/bson/util/builder.h" #include "mongo/db/bson/dotted_path_support.h" #include "mongo/s/catalog/type_chunk.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/collection_sharding_runtime.cpp b/src/mongo/db/s/collection_sharding_runtime.cpp index d2ce632ad95..9d0b1d4cdcc 100644 --- a/src/mongo/db/s/collection_sharding_runtime.cpp +++ b/src/mongo/db/s/collection_sharding_runtime.cpp @@ -41,7 +41,6 @@ #include "mongo/db/s/sharding_state.h" #include "mongo/logv2/log.h" #include "mongo/util/duration.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/collection_sharding_state.cpp b/src/mongo/db/s/collection_sharding_state.cpp index e3a9d0d9f47..0bd4b0d3ee5 100644 --- a/src/mongo/db/s/collection_sharding_state.cpp +++ b/src/mongo/db/s/collection_sharding_state.cpp @@ -36,7 +36,6 @@ #include "mongo/db/repl/read_concern_args.h" #include "mongo/s/stale_exception.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/string_map.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_add_shard_command.cpp b/src/mongo/db/s/config/configsvr_add_shard_command.cpp index 6f6b449b0cf..414370cfc23 100644 --- a/src/mongo/db/s/config/configsvr_add_shard_command.cpp +++ b/src/mongo/db/s/config/configsvr_add_shard_command.cpp @@ -46,7 +46,6 @@ #include "mongo/s/catalog/type_shard.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/add_shard_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_add_shard_to_zone_command.cpp b/src/mongo/db/s/config/configsvr_add_shard_to_zone_command.cpp index 6b6974b082f..bc9aa04eaad 100644 --- a/src/mongo/db/s/config/configsvr_add_shard_to_zone_command.cpp +++ b/src/mongo/db/s/config/configsvr_add_shard_to_zone_command.cpp @@ -40,7 +40,6 @@ #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/add_shard_to_zone_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_balancer_collection_status_command.cpp b/src/mongo/db/s/config/configsvr_balancer_collection_status_command.cpp index e281e5df01a..c8d1b7e8743 100644 --- a/src/mongo/db/s/config/configsvr_balancer_collection_status_command.cpp +++ b/src/mongo/db/s/config/configsvr_balancer_collection_status_command.cpp @@ -49,7 +49,6 @@ #include "mongo/s/catalog_cache_loader.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/balancer_collection_status_gen.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_clear_jumbo_flag_command.cpp b/src/mongo/db/s/config/configsvr_clear_jumbo_flag_command.cpp index 8779bd3e48c..736dfc16e6f 100644 --- a/src/mongo/db/s/config/configsvr_clear_jumbo_flag_command.cpp +++ b/src/mongo/db/s/config/configsvr_clear_jumbo_flag_command.cpp @@ -39,7 +39,6 @@ #include "mongo/s/catalog/dist_lock_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/clear_jumbo_flag_gen.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp b/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp index eefa1012b2f..3fc7aeefc48 100644 --- a/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp +++ b/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp @@ -47,7 +47,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/commit_chunk_migration_request_type.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_commit_move_primary_command.cpp b/src/mongo/db/s/config/configsvr_commit_move_primary_command.cpp index ea920e9c31d..a221b6bc314 100644 --- a/src/mongo/db/s/config/configsvr_commit_move_primary_command.cpp +++ b/src/mongo/db/s/config/configsvr_commit_move_primary_command.cpp @@ -36,7 +36,6 @@ #include "mongo/db/repl/read_concern_args.h" #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/request_types/move_primary_gen.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_create_collection_command.cpp b/src/mongo/db/s/config/configsvr_create_collection_command.cpp index 2ac40d3bc23..ddda9b19d99 100644 --- a/src/mongo/db/s/config/configsvr_create_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_create_collection_command.cpp @@ -44,7 +44,6 @@ #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/create_collection_gen.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_create_database_command.cpp b/src/mongo/db/s/config/configsvr_create_database_command.cpp index 78fd446c168..60211eee6f7 100644 --- a/src/mongo/db/s/config/configsvr_create_database_command.cpp +++ b/src/mongo/db/s/config/configsvr_create_database_command.cpp @@ -46,7 +46,6 @@ #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/create_database_gen.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_drop_collection_command.cpp b/src/mongo/db/s/config/configsvr_drop_collection_command.cpp index 938aa7ab9a7..1ee60430d63 100644 --- a/src/mongo/db/s/config/configsvr_drop_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_drop_collection_command.cpp @@ -45,7 +45,6 @@ #include "mongo/s/grid.h" #include "mongo/s/stale_exception.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_drop_database_command.cpp b/src/mongo/db/s/config/configsvr_drop_database_command.cpp index 68a296a0716..a6854cd2bfa 100644 --- a/src/mongo/db/s/config/configsvr_drop_database_command.cpp +++ b/src/mongo/db/s/config/configsvr_drop_database_command.cpp @@ -41,7 +41,6 @@ #include "mongo/s/catalog/type_database.h" #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp b/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp index 0ab3a6e3d18..6f505be2242 100644 --- a/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp +++ b/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp @@ -46,7 +46,6 @@ #include "mongo/s/catalog/type_database.h" #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp b/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp index e9ad4d92564..d9011124599 100644 --- a/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp +++ b/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp @@ -41,7 +41,6 @@ #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/merge_chunk_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_move_chunk_command.cpp b/src/mongo/db/s/config/configsvr_move_chunk_command.cpp index ab8c8e752ec..c9a3649cfa1 100644 --- a/src/mongo/db/s/config/configsvr_move_chunk_command.cpp +++ b/src/mongo/db/s/config/configsvr_move_chunk_command.cpp @@ -40,7 +40,6 @@ #include "mongo/db/repl/read_concern_args.h" #include "mongo/db/s/balancer/balancer.h" #include "mongo/s/request_types/balance_chunk_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_move_primary_command.cpp b/src/mongo/db/s/config/configsvr_move_primary_command.cpp index 1595d7fdcdd..53eb5aa552f 100644 --- a/src/mongo/db/s/config/configsvr_move_primary_command.cpp +++ b/src/mongo/db/s/config/configsvr_move_primary_command.cpp @@ -51,7 +51,6 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/move_primary_gen.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_refine_collection_shard_key_command.cpp b/src/mongo/db/s/config/configsvr_refine_collection_shard_key_command.cpp index 3d862d632d1..31ad17062b1 100644 --- a/src/mongo/db/s/config/configsvr_refine_collection_shard_key_command.cpp +++ b/src/mongo/db/s/config/configsvr_refine_collection_shard_key_command.cpp @@ -42,7 +42,6 @@ #include "mongo/s/catalog/dist_lock_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/refine_collection_shard_key_gen.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_remove_shard_command.cpp b/src/mongo/db/s/config/configsvr_remove_shard_command.cpp index 2b3cfc9a1ae..4c0dc80a658 100644 --- a/src/mongo/db/s/config/configsvr_remove_shard_command.cpp +++ b/src/mongo/db/s/config/configsvr_remove_shard_command.cpp @@ -47,7 +47,6 @@ #include "mongo/s/catalog_cache.h" #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_remove_shard_from_zone_command.cpp b/src/mongo/db/s/config/configsvr_remove_shard_from_zone_command.cpp index 2f3fb559fe2..fd45f0fd824 100644 --- a/src/mongo/db/s/config/configsvr_remove_shard_from_zone_command.cpp +++ b/src/mongo/db/s/config/configsvr_remove_shard_from_zone_command.cpp @@ -40,7 +40,6 @@ #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/remove_shard_from_zone_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp index 4fca10fda03..506597f1e35 100644 --- a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp @@ -54,7 +54,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/config_server_client.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/s/config/configsvr_split_chunk_command.cpp b/src/mongo/db/s/config/configsvr_split_chunk_command.cpp index 5451137ad59..a889acbeeb3 100644 --- a/src/mongo/db/s/config/configsvr_split_chunk_command.cpp +++ b/src/mongo/db/s/config/configsvr_split_chunk_command.cpp @@ -41,7 +41,6 @@ #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/split_chunk_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_update_zone_key_range_command.cpp b/src/mongo/db/s/config/configsvr_update_zone_key_range_command.cpp index ebab9d7a4d6..cad9f088310 100644 --- a/src/mongo/db/s/config/configsvr_update_zone_key_range_command.cpp +++ b/src/mongo/db/s/config/configsvr_update_zone_key_range_command.cpp @@ -40,7 +40,6 @@ #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/update_zone_key_range_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/config/initial_split_policy.cpp b/src/mongo/db/s/config/initial_split_policy.cpp index 6826a1c8123..d89d3706806 100644 --- a/src/mongo/db/s/config/initial_split_policy.cpp +++ b/src/mongo/db/s/config/initial_split_policy.cpp @@ -40,7 +40,6 @@ #include "mongo/s/catalog/type_shard.h" #include "mongo/s/grid.h" #include "mongo/s/shard_util.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/initial_split_policy_test.cpp b/src/mongo/db/s/config/initial_split_policy_test.cpp index 7d4309aa4fb..739965ffc19 100644 --- a/src/mongo/db/s/config/initial_split_policy_test.cpp +++ b/src/mongo/db/s/config/initial_split_policy_test.cpp @@ -38,7 +38,6 @@ #include "mongo/s/catalog/type_tags.h" #include "mongo/s/config_server_test_fixture.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/namespace_serializer.cpp b/src/mongo/db/s/config/namespace_serializer.cpp index 6c69eaa668d..f45905448a2 100644 --- a/src/mongo/db/s/config/namespace_serializer.cpp +++ b/src/mongo/db/s/config/namespace_serializer.cpp @@ -38,7 +38,6 @@ #include "mongo/db/namespace_string.h" #include "mongo/db/operation_context.h" #include "mongo/db/s/config/sharding_catalog_manager.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/config/sharding_catalog_manager.cpp b/src/mongo/db/s/config/sharding_catalog_manager.cpp index a02a6b3471c..6e8ae6c1700 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager.cpp @@ -55,7 +55,6 @@ #include "mongo/s/write_ops/batched_command_request.h" #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/transport/service_entry_point.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_add_shard_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_add_shard_test.cpp index c061abbc813..422e0438380 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_add_shard_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_add_shard_test.cpp @@ -54,7 +54,6 @@ #include "mongo/s/database_version_helpers.h" #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { 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 10e0ef8dc0e..cdcdf555405 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_chunk_operations.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_chunk_operations.cpp @@ -45,6 +45,7 @@ #include "mongo/db/repl/repl_client_info.h" #include "mongo/db/s/sharding_logging.h" #include "mongo/db/server_options.h" +#include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/catalog/sharding_catalog_client.h" #include "mongo/s/catalog/type_chunk.h" @@ -53,7 +54,6 @@ #include "mongo/s/grid.h" #include "mongo/s/shard_key_pattern.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { @@ -1102,9 +1102,12 @@ void ShardingCatalogManager::ensureChunkVersionIsGreaterThan(OperationContext* o if (matchingChunksVector.empty()) { // This can happen in a number of cases, such as that the collection has been dropped, its // shard key has been refined, the chunk has been split, or the chunk has been merged. - LOG(0) << "ensureChunkVersionIsGreaterThan did not find any chunks with minKey " << minKey - << ", maxKey " << maxKey << ", and epoch " << version.epoch() - << ". Returning success."; + LOGV2(23884, + "ensureChunkVersionIsGreaterThan did not find any chunks with minKey {minKey}, " + "maxKey {maxKey}, and epoch {version_epoch}. Returning success.", + "minKey"_attr = minKey, + "maxKey"_attr = maxKey, + "version_epoch"_attr = version.epoch()); return; } @@ -1112,10 +1115,15 @@ void ShardingCatalogManager::ensureChunkVersionIsGreaterThan(OperationContext* o uassertStatusOK(ChunkType::fromConfigBSON(matchingChunksVector.front())); if (version.isOlderThan(currentChunk.getVersion())) { - LOG(0) << "ensureChunkVersionIsGreaterThan found that the chunk with minKey " << minKey - << ", maxKey " << maxKey << ", and epoch " << version.epoch() - << " already has a higher version than " << version << ". Current chunk is " - << currentChunk.toConfigBSON() << ". Returning success."; + LOGV2(23885, + "ensureChunkVersionIsGreaterThan found that the chunk with minKey {minKey}, maxKey " + "{maxKey}, and epoch {version_epoch} already has a higher version than {version}. " + "Current chunk is {currentChunk_toConfigBSON}. Returning success.", + "minKey"_attr = minKey, + "maxKey"_attr = maxKey, + "version_epoch"_attr = version.epoch(), + "version"_attr = version, + "currentChunk_toConfigBSON"_attr = currentChunk.toConfigBSON()); return; } @@ -1131,10 +1139,11 @@ void ShardingCatalogManager::ensureChunkVersionIsGreaterThan(OperationContext* o 1 /* limit */)) .docs; if (highestChunksVector.empty()) { - LOG(0) << "ensureChunkVersionIsGreaterThan did not find any chunks with epoch " - << version.epoch() - << " when attempting to find the collectionVersion. The collection must have been " - "dropped concurrently. Returning success."; + LOGV2(23886, + "ensureChunkVersionIsGreaterThan did not find any chunks with epoch {version_epoch} " + "when attempting to find the collectionVersion. The collection must have been " + "dropped concurrently. Returning success.", + "version_epoch"_attr = version.epoch()); return; } const auto highestChunk = @@ -1155,14 +1164,23 @@ void ShardingCatalogManager::ensureChunkVersionIsGreaterThan(OperationContext* o false /* upsert */, kNoWaitWriteConcern)); if (didUpdate) { - LOG(0) << "ensureChunkVersionIsGreaterThan bumped the version of the chunk with minKey " - << minKey << ", maxKey " << maxKey << ", and epoch " << version.epoch() - << ". Chunk is now " << newChunk.toConfigBSON(); + LOGV2( + 23887, + "ensureChunkVersionIsGreaterThan bumped the version of the chunk with minKey {minKey}, " + "maxKey {maxKey}, and epoch {version_epoch}. Chunk is now {newChunk_toConfigBSON}", + "minKey"_attr = minKey, + "maxKey"_attr = maxKey, + "version_epoch"_attr = version.epoch(), + "newChunk_toConfigBSON"_attr = newChunk.toConfigBSON()); } else { - LOG(0) << "ensureChunkVersionIsGreaterThan did not find a chunk matching minKey " << minKey - << ", maxKey " << maxKey << ", and epoch " << version.epoch() - << " when trying to bump its version. The collection must have been dropped " - "concurrently. Returning success."; + LOGV2(23888, + "ensureChunkVersionIsGreaterThan did not find a chunk matching minKey {minKey}, " + "maxKey {maxKey}, and epoch {version_epoch} when trying to bump its version. The " + "collection must have been dropped " + "concurrently. Returning success.", + "minKey"_attr = minKey, + "maxKey"_attr = maxKey, + "version_epoch"_attr = version.epoch()); } } 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 49ce207adf2..7e05e1437a7 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 @@ -75,7 +75,6 @@ #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/transport/service_entry_point.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/s/config/sharding_catalog_manager_create_collection_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_create_collection_test.cpp index 7fd56297e96..a25e50b0f4b 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_create_collection_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_create_collection_test.cpp @@ -49,7 +49,6 @@ #include "mongo/s/grid.h" #include "mongo/s/shard_key_pattern.h" #include "mongo/stdx/future.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_create_database_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_create_database_test.cpp index faa2fecfdf0..3fac0d6e5eb 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_create_database_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_create_database_test.cpp @@ -43,7 +43,6 @@ #include "mongo/s/catalog/type_database.h" #include "mongo/s/catalog/type_shard.h" #include "mongo/s/config_server_test_fixture.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_database_operations.cpp b/src/mongo/db/s/config/sharding_catalog_manager_database_operations.cpp index c46a65966a7..483c2c0b018 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_database_operations.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_database_operations.cpp @@ -47,7 +47,6 @@ #include "mongo/s/grid.h" #include "mongo/s/shard_id.h" #include "mongo/s/shard_util.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_enable_sharding_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_enable_sharding_test.cpp index 4e573555acc..af13425402e 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_enable_sharding_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_enable_sharding_test.cpp @@ -46,7 +46,6 @@ #include "mongo/s/config_server_test_fixture.h" #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/stdx/future.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { 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 1a596651ded..e01fcf55b6e 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 @@ -53,7 +53,6 @@ #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/stdx/chrono.h" #include "mongo/stdx/future.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_shard_collection_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_shard_collection_test.cpp index df5ce39bbeb..9181f86a09d 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_shard_collection_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_shard_collection_test.cpp @@ -47,7 +47,6 @@ #include "mongo/s/config_server_test_fixture.h" #include "mongo/s/grid.h" #include "mongo/s/shard_key_pattern.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp b/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp index b2148656e52..d0d0d9f985e 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp @@ -74,7 +74,6 @@ #include "mongo/s/write_ops/batched_command_request.h" #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/s/config/sharding_catalog_manager_zone_operations.cpp b/src/mongo/db/s/config/sharding_catalog_manager_zone_operations.cpp index edb3d7c6d81..2c199a69337 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_zone_operations.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_zone_operations.cpp @@ -47,7 +47,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/shard_key_pattern.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/database_sharding_state.cpp b/src/mongo/db/s/database_sharding_state.cpp index ed018daec96..4052917dcec 100644 --- a/src/mongo/db/s/database_sharding_state.cpp +++ b/src/mongo/db/s/database_sharding_state.cpp @@ -39,7 +39,6 @@ #include "mongo/s/database_version_helpers.h" #include "mongo/s/stale_exception.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/flush_database_cache_updates_command.cpp b/src/mongo/db/s/flush_database_cache_updates_command.cpp index 8b06a59c2cc..5b5ff581996 100644 --- a/src/mongo/db/s/flush_database_cache_updates_command.cpp +++ b/src/mongo/db/s/flush_database_cache_updates_command.cpp @@ -51,7 +51,6 @@ #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp b/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp index 3359431d84a..8430f97e89f 100644 --- a/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp +++ b/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp @@ -48,7 +48,6 @@ #include "mongo/s/catalog_cache_loader.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/flush_routing_table_cache_updates_gen.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/get_shard_version_command.cpp b/src/mongo/db/s/get_shard_version_command.cpp index 98d701bfe40..d5418cb7951 100644 --- a/src/mongo/db/s/get_shard_version_command.cpp +++ b/src/mongo/db/s/get_shard_version_command.cpp @@ -41,7 +41,6 @@ #include "mongo/db/s/sharded_connection_info.h" #include "mongo/db/s/sharding_state.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/merge_chunks_command.cpp b/src/mongo/db/s/merge_chunks_command.cpp index 5fd4574590b..317510ef4ad 100644 --- a/src/mongo/db/s/merge_chunks_command.cpp +++ b/src/mongo/db/s/merge_chunks_command.cpp @@ -47,7 +47,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/merge_chunk_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/metadata_manager.cpp b/src/mongo/db/s/metadata_manager.cpp index 669b95c59b9..4523d1761d8 100644 --- a/src/mongo/db/s/metadata_manager.cpp +++ b/src/mongo/db/s/metadata_manager.cpp @@ -46,7 +46,6 @@ #include "mongo/s/grid.h" #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp b/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp index 76dd0bcde8e..0b6d87cd791 100644 --- a/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp +++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp @@ -57,7 +57,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/util/elapsed_tracker.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/db/s/migration_coordinator.cpp b/src/mongo/db/s/migration_coordinator.cpp index aaacbc145c7..1e38cc4060c 100644 --- a/src/mongo/db/s/migration_coordinator.cpp +++ b/src/mongo/db/s/migration_coordinator.cpp @@ -35,8 +35,8 @@ #include "mongo/db/s/migration_util.h" #include "mongo/db/s/range_deletion_task_gen.h" +#include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { @@ -75,10 +75,13 @@ MigrationCoordinator::MigrationCoordinator(UUID migrationId, MigrationCoordinator::~MigrationCoordinator() = default; void MigrationCoordinator::startMigration(OperationContext* opCtx) { - LOG(0) << _logPrefix() << "Persisting migration coordinator doc"; + LOGV2( + 23889, "{logPrefix}Persisting migration coordinator doc", "logPrefix"_attr = _logPrefix()); migrationutil::persistMigrationCoordinatorLocally(opCtx, _migrationInfo); - LOG(0) << _logPrefix() << "Persisting range deletion task on donor"; + LOGV2(23890, + "{logPrefix}Persisting range deletion task on donor", + "logPrefix"_attr = _logPrefix()); RangeDeletionTask donorDeletionTask(_migrationInfo.getId(), _migrationInfo.getNss(), _migrationInfo.getCollectionUuid(), @@ -91,25 +94,34 @@ void MigrationCoordinator::startMigration(OperationContext* opCtx) { } void MigrationCoordinator::setMigrationDecision(Decision decision) { - LOG(0) << _logPrefix() << "MigrationCoordinator setting migration decision to " - << (decision == Decision::kCommitted ? "committed" : "aborted"); + LOGV2(23891, + "{logPrefix}MigrationCoordinator setting migration decision to " + "{decision_Decision_kCommitted_committed_aborted}", + "logPrefix"_attr = _logPrefix(), + "decision_Decision_kCommitted_committed_aborted"_attr = + (decision == Decision::kCommitted ? "committed" : "aborted")); _decision = decision; } boost::optional<SemiFuture<void>> MigrationCoordinator::completeMigration(OperationContext* opCtx) { if (!_decision) { - LOG(0) << _logPrefix() - << "Migration completed without setting a decision. This node might have started " - "stepping down or shutting down after having initiated commit against the config " - "server but before having found out if the commit succeeded. The new primary of " - "this replica set will complete the migration coordination."; + LOGV2(23892, + "{logPrefix}Migration completed without setting a decision. This node might have " + "started " + "stepping down or shutting down after having initiated commit against the config " + "server but before having found out if the commit succeeded. The new primary of " + "this replica set will complete the migration coordination.", + "logPrefix"_attr = _logPrefix()); return boost::none; } - LOG(0) << _logPrefix() << "MigrationCoordinator delivering decision " - << (_decision == Decision::kCommitted ? "committed" : "aborted") - << " to self and to recipient"; + LOGV2(23893, + "{logPrefix}MigrationCoordinator delivering decision " + "{decision_Decision_kCommitted_committed_aborted} to self and to recipient", + "logPrefix"_attr = _logPrefix(), + "decision_Decision_kCommitted_committed_aborted"_attr = + (_decision == Decision::kCommitted ? "committed" : "aborted")); boost::optional<SemiFuture<void>> cleanupCompleteFuture = boost::none; @@ -133,26 +145,37 @@ SemiFuture<void> MigrationCoordinator::_commitMigrationOnDonorAndRecipient( OperationContext* opCtx) { hangBeforeMakingCommitDecisionDurable.pauseWhileSet(); - LOG(0) << _logPrefix() << "Making commit decision durable"; + LOGV2(23894, "{logPrefix}Making commit decision durable", "logPrefix"_attr = _logPrefix()); migrationutil::persistCommitDecision(opCtx, _migrationInfo.getId()); - LOG(0) << _logPrefix() << "Bumping transaction for " << _migrationInfo.getRecipientShardId() - << " lsid: " << _migrationInfo.getLsid().toBSON() << " txn: " << TxnNumber{1}; + LOGV2(23895, + "{logPrefix}Bumping transaction for {migrationInfo_getRecipientShardId} lsid: " + "{migrationInfo_getLsid} txn: {TxnNumber_1}", + "logPrefix"_attr = _logPrefix(), + "migrationInfo_getRecipientShardId"_attr = _migrationInfo.getRecipientShardId(), + "migrationInfo_getLsid"_attr = _migrationInfo.getLsid().toBSON(), + "TxnNumber_1"_attr = TxnNumber{1}); migrationutil::advanceTransactionOnRecipient( opCtx, _migrationInfo.getRecipientShardId(), _migrationInfo.getLsid(), TxnNumber{1}); hangBeforeSendingCommitDecision.pauseWhileSet(); - LOG(0) << _logPrefix() << "Deleting range deletion task on recipient"; + LOGV2(23896, + "{logPrefix}Deleting range deletion task on recipient", + "logPrefix"_attr = _logPrefix()); migrationutil::deleteRangeDeletionTaskOnRecipient( opCtx, _migrationInfo.getRecipientShardId(), _migrationInfo.getId()); - LOG(0) << _logPrefix() << "Marking range deletion task on donor as ready for processing"; + LOGV2(23897, + "{logPrefix}Marking range deletion task on donor as ready for processing", + "logPrefix"_attr = _logPrefix()); migrationutil::markAsReadyRangeDeletionTaskLocally(opCtx, _migrationInfo.getId()); // At this point the decision cannot be changed and will be recovered in the event of a // failover, so it is safe to schedule the deletion task after updating the persisted state. - LOG(0) << _logPrefix() << "Scheduling range deletion task on donor"; + LOGV2(23898, + "{logPrefix}Scheduling range deletion task on donor", + "logPrefix"_attr = _logPrefix()); RangeDeletionTask deletionTask(_migrationInfo.getId(), _migrationInfo.getNss(), _migrationInfo.getCollectionUuid(), @@ -165,26 +188,36 @@ SemiFuture<void> MigrationCoordinator::_commitMigrationOnDonorAndRecipient( void MigrationCoordinator::_abortMigrationOnDonorAndRecipient(OperationContext* opCtx) { hangBeforeMakingAbortDecisionDurable.pauseWhileSet(); - LOG(0) << _logPrefix() << "Making abort decision durable"; + LOGV2(23899, "{logPrefix}Making abort decision durable", "logPrefix"_attr = _logPrefix()); migrationutil::persistAbortDecision(opCtx, _migrationInfo.getId()); - LOG(0) << _logPrefix() << "Bumping transaction for " << _migrationInfo.getRecipientShardId() - << " lsid: " << _migrationInfo.getLsid().toBSON() << " txn: " << TxnNumber{1}; + LOGV2(23900, + "{logPrefix}Bumping transaction for {migrationInfo_getRecipientShardId} lsid: " + "{migrationInfo_getLsid} txn: {TxnNumber_1}", + "logPrefix"_attr = _logPrefix(), + "migrationInfo_getRecipientShardId"_attr = _migrationInfo.getRecipientShardId(), + "migrationInfo_getLsid"_attr = _migrationInfo.getLsid().toBSON(), + "TxnNumber_1"_attr = TxnNumber{1}); migrationutil::advanceTransactionOnRecipient( opCtx, _migrationInfo.getRecipientShardId(), _migrationInfo.getLsid(), TxnNumber{1}); hangBeforeSendingAbortDecision.pauseWhileSet(); - LOG(0) << _logPrefix() << "Deleting range deletion task on donor"; + LOGV2( + 23901, "{logPrefix}Deleting range deletion task on donor", "logPrefix"_attr = _logPrefix()); migrationutil::deleteRangeDeletionTaskLocally(opCtx, _migrationInfo.getId()); - LOG(0) << _logPrefix() << "Marking range deletion task on recipient as ready for processing"; + LOGV2(23902, + "{logPrefix}Marking range deletion task on recipient as ready for processing", + "logPrefix"_attr = _logPrefix()); migrationutil::markAsReadyRangeDeletionTaskOnRecipient( opCtx, _migrationInfo.getRecipientShardId(), _migrationInfo.getId()); } void MigrationCoordinator::forgetMigration(OperationContext* opCtx) { - LOG(0) << _logPrefix() << "Deleting migration coordinator document"; + LOGV2(23903, + "{logPrefix}Deleting migration coordinator document", + "logPrefix"_attr = _logPrefix()); migrationutil::deleteMigrationCoordinatorDocumentLocally(opCtx, _migrationInfo.getId()); } diff --git a/src/mongo/db/s/migration_destination_manager.cpp b/src/mongo/db/s/migration_destination_manager.cpp index 8124f36a16f..4ccb3874f09 100644 --- a/src/mongo/db/s/migration_destination_manager.cpp +++ b/src/mongo/db/s/migration_destination_manager.cpp @@ -70,7 +70,6 @@ #include "mongo/s/shard_key_pattern.h" #include "mongo/stdx/chrono.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/producer_consumer_queue.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp index 50d63eec920..84064273757 100644 --- a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp +++ b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp @@ -47,7 +47,6 @@ #include "mongo/s/chunk_version.h" #include "mongo/s/request_types/migration_secondary_throttle_options.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/migration_source_manager.cpp b/src/mongo/db/s/migration_source_manager.cpp index 505622e074d..77382fb15b6 100644 --- a/src/mongo/db/s/migration_source_manager.cpp +++ b/src/mongo/db/s/migration_source_manager.cpp @@ -69,7 +69,6 @@ #include "mongo/util/elapsed_tracker.h" #include "mongo/util/exit.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/migration_util.cpp b/src/mongo/db/s/migration_util.cpp index f5305dae216..75b0c8a24c2 100644 --- a/src/mongo/db/s/migration_util.cpp +++ b/src/mongo/db/s/migration_util.cpp @@ -63,7 +63,6 @@ #include "mongo/s/request_types/ensure_chunk_version_is_greater_than_gen.h" #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" namespace mongo { namespace migrationutil { @@ -182,8 +181,12 @@ void retryIdempotentWorkUntilSuccess(OperationContext* opCtx, break; } catch (DBException& ex) { if (attempt % kLogRetryAttemptThreshold == 1) { - warning() << "retrying " << taskDescription << " after " << attempt - << " failed attempts, last seen error: " << ex; + LOGV2_WARNING(23937, + "retrying {taskDescription} after {attempt} failed attempts, last " + "seen error: {ex}", + "taskDescription"_attr = taskDescription, + "attempt"_attr = attempt, + "ex"_attr = ex); } } } diff --git a/src/mongo/db/s/move_chunk_command.cpp b/src/mongo/db/s/move_chunk_command.cpp index 23713ad2c55..63f1dd13507 100644 --- a/src/mongo/db/s/move_chunk_command.cpp +++ b/src/mongo/db/s/move_chunk_command.cpp @@ -51,7 +51,6 @@ #include "mongo/util/concurrency/notification.h" #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/move_primary_command.cpp b/src/mongo/db/s/move_primary_command.cpp index 0d29b270f28..92096a6dedc 100644 --- a/src/mongo/db/s/move_primary_command.cpp +++ b/src/mongo/db/s/move_primary_command.cpp @@ -39,7 +39,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/move_primary_gen.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/move_primary_source_manager.cpp b/src/mongo/db/s/move_primary_source_manager.cpp index c6b97b5b1be..bc3ed4ad159 100644 --- a/src/mongo/db/s/move_primary_source_manager.cpp +++ b/src/mongo/db/s/move_primary_source_manager.cpp @@ -47,7 +47,6 @@ #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/move_timing_helper.cpp b/src/mongo/db/s/move_timing_helper.cpp index 7090cf6e009..0e671f212ea 100644 --- a/src/mongo/db/s/move_timing_helper.cpp +++ b/src/mongo/db/s/move_timing_helper.cpp @@ -38,7 +38,6 @@ #include "mongo/db/s/sharding_logging.h" #include "mongo/logv2/log.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/periodic_balancer_config_refresher.cpp b/src/mongo/db/s/periodic_balancer_config_refresher.cpp index 96c33e0ceb3..f6ea4a373be 100644 --- a/src/mongo/db/s/periodic_balancer_config_refresher.cpp +++ b/src/mongo/db/s/periodic_balancer_config_refresher.cpp @@ -38,7 +38,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/balancer_configuration.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp b/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp index b30403d42ff..5bb45ceec4d 100644 --- a/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp +++ b/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp @@ -40,7 +40,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/grid.h" #include "mongo/s/query/cluster_aggregate.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/range_deletion_util.cpp b/src/mongo/db/s/range_deletion_util.cpp index b9a979279de..6022cf096b5 100644 --- a/src/mongo/db/s/range_deletion_util.cpp +++ b/src/mongo/db/s/range_deletion_util.cpp @@ -62,7 +62,6 @@ #include "mongo/executor/task_executor.h" #include "mongo/logv2/log.h" #include "mongo/util/future_util.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp b/src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp index 2328a973aef..bfe795894a5 100644 --- a/src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp +++ b/src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp @@ -41,7 +41,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/cannot_implicitly_create_collection_info.h" #include "mongo/s/stale_exception.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/session_catalog_migration_destination.cpp b/src/mongo/db/s/session_catalog_migration_destination.cpp index 9e55b7e2aad..58f16e91711 100644 --- a/src/mongo/db/s/session_catalog_migration_destination.cpp +++ b/src/mongo/db/s/session_catalog_migration_destination.cpp @@ -46,10 +46,10 @@ #include "mongo/db/session_catalog_mongod.h" #include "mongo/db/transaction_participant.h" #include "mongo/db/write_concern.h" +#include "mongo/logger/redaction.h" #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/shard_id.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/set_shard_version_command.cpp b/src/mongo/db/s/set_shard_version_command.cpp index a28ba943bb4..caa73623995 100644 --- a/src/mongo/db/s/set_shard_version_command.cpp +++ b/src/mongo/db/s/set_shard_version_command.cpp @@ -51,7 +51,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/set_shard_version_request.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp index 9df640dc043..a97339898b6 100644 --- a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp +++ b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp @@ -49,7 +49,6 @@ #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/shard_metadata_util.cpp b/src/mongo/db/s/shard_metadata_util.cpp index 37500a2ee15..7cbc8d6e59d 100644 --- a/src/mongo/db/s/shard_metadata_util.cpp +++ b/src/mongo/db/s/shard_metadata_util.cpp @@ -46,7 +46,6 @@ #include "mongo/s/catalog/type_shard_database.h" #include "mongo/s/chunk_version.h" #include "mongo/s/write_ops/batched_command_response.h" -#include "mongo/util/log.h" namespace mongo { namespace shardmetadatautil { diff --git a/src/mongo/db/s/shard_server_op_observer.cpp b/src/mongo/db/s/shard_server_op_observer.cpp index caf4b68b561..939125ba75f 100644 --- a/src/mongo/db/s/shard_server_op_observer.cpp +++ b/src/mongo/db/s/shard_server_op_observer.cpp @@ -54,7 +54,6 @@ #include "mongo/s/catalog/type_shard_database.h" #include "mongo/s/catalog_cache_loader.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/sharded_connection_info.cpp b/src/mongo/db/s/sharded_connection_info.cpp index 7348c90c486..2624858265c 100644 --- a/src/mongo/db/s/sharded_connection_info.cpp +++ b/src/mongo/db/s/sharded_connection_info.cpp @@ -35,7 +35,6 @@ #include "mongo/db/client.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_initialization_mongod.cpp b/src/mongo/db/s/sharding_initialization_mongod.cpp index e35e529e9df..c0d8223a467 100644 --- a/src/mongo/db/s/sharding_initialization_mongod.cpp +++ b/src/mongo/db/s/sharding_initialization_mongod.cpp @@ -68,7 +68,6 @@ #include "mongo/s/grid.h" #include "mongo/s/sharding_initialization.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/sharding_logging.cpp b/src/mongo/db/s/sharding_logging.cpp index e714e59e73d..621b176a1ab 100644 --- a/src/mongo/db/s/sharding_logging.cpp +++ b/src/mongo/db/s/sharding_logging.cpp @@ -40,7 +40,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/catalog/type_changelog.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/sharding_logging_test.cpp b/src/mongo/db/s/sharding_logging_test.cpp index 2fefc1ddae0..f0fc4169181 100644 --- a/src/mongo/db/s/sharding_logging_test.cpp +++ b/src/mongo/db/s/sharding_logging_test.cpp @@ -43,7 +43,6 @@ #include "mongo/s/sharding_router_test_fixture.h" #include "mongo/stdx/chrono.h" #include "mongo/stdx/future.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/text.h" diff --git a/src/mongo/db/s/sharding_state.cpp b/src/mongo/db/s/sharding_state.cpp index 50c127f4de0..bf726297d0c 100644 --- a/src/mongo/db/s/sharding_state.cpp +++ b/src/mongo/db/s/sharding_state.cpp @@ -36,7 +36,6 @@ #include "mongo/db/operation_context.h" #include "mongo/db/server_options.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_state_command.cpp b/src/mongo/db/s/sharding_state_command.cpp index 21cef4c92a1..0d03ac7c311 100644 --- a/src/mongo/db/s/sharding_state_command.cpp +++ b/src/mongo/db/s/sharding_state_command.cpp @@ -38,7 +38,6 @@ #include "mongo/db/s/collection_sharding_state.h" #include "mongo/db/s/sharding_state.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_state_recovery.cpp b/src/mongo/db/s/sharding_state_recovery.cpp index 98d7a915e49..f14e2b1e279 100644 --- a/src/mongo/db/s/sharding_state_recovery.cpp +++ b/src/mongo/db/s/sharding_state_recovery.cpp @@ -53,7 +53,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_shard_collection.cpp b/src/mongo/db/s/shardsvr_shard_collection.cpp index 61d844b6fe8..22b68045f35 100644 --- a/src/mongo/db/s/shardsvr_shard_collection.cpp +++ b/src/mongo/db/s/shardsvr_shard_collection.cpp @@ -64,7 +64,6 @@ #include "mongo/s/request_types/shard_collection_gen.h" #include "mongo/s/shard_util.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/s/split_chunk.cpp b/src/mongo/db/s/split_chunk.cpp index ee29084c850..88ea1aab764 100644 --- a/src/mongo/db/s/split_chunk.cpp +++ b/src/mongo/db/s/split_chunk.cpp @@ -52,7 +52,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/split_chunk_request_type.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/split_chunk_command.cpp b/src/mongo/db/s/split_chunk_command.cpp index 2bc27bb5fb8..8b509c00f8b 100644 --- a/src/mongo/db/s/split_chunk_command.cpp +++ b/src/mongo/db/s/split_chunk_command.cpp @@ -44,7 +44,6 @@ #include "mongo/db/s/split_chunk.h" #include "mongo/logv2/log.h" #include "mongo/s/catalog/type_chunk.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/split_chunk_test.cpp b/src/mongo/db/s/split_chunk_test.cpp index b18275f72a9..29872644d40 100644 --- a/src/mongo/db/s/split_chunk_test.cpp +++ b/src/mongo/db/s/split_chunk_test.cpp @@ -55,7 +55,6 @@ #include "mongo/s/write_ops/batched_command_request.h" #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/split_vector.cpp b/src/mongo/db/s/split_vector.cpp index 725a60f95b1..0a061077d2a 100644 --- a/src/mongo/db/s/split_vector.cpp +++ b/src/mongo/db/s/split_vector.cpp @@ -45,7 +45,6 @@ #include "mongo/db/query/internal_plans.h" #include "mongo/db/query/plan_executor.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/transaction_coordinator_catalog.cpp b/src/mongo/db/s/transaction_coordinator_catalog.cpp index 0b90a8694f3..13d80cf0b88 100644 --- a/src/mongo/db/s/transaction_coordinator_catalog.cpp +++ b/src/mongo/db/s/transaction_coordinator_catalog.cpp @@ -35,7 +35,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/transaction_coordinator_futures_util.cpp b/src/mongo/db/s/transaction_coordinator_futures_util.cpp index f243396228e..506296f0d9f 100644 --- a/src/mongo/db/s/transaction_coordinator_futures_util.cpp +++ b/src/mongo/db/s/transaction_coordinator_futures_util.cpp @@ -41,7 +41,6 @@ #include "mongo/s/grid.h" #include "mongo/transport/service_entry_point.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { namespace txn { diff --git a/src/mongo/db/s/transaction_coordinator_service.cpp b/src/mongo/db/s/transaction_coordinator_service.cpp index 131a79eef8a..4b27021a445 100644 --- a/src/mongo/db/s/transaction_coordinator_service.cpp +++ b/src/mongo/db/s/transaction_coordinator_service.cpp @@ -39,7 +39,6 @@ #include "mongo/db/write_concern.h" #include "mongo/logv2/log.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/transaction_coordinator_service_test.cpp b/src/mongo/db/s/transaction_coordinator_service_test.cpp index 73a7370ac2e..b60d1bcfb00 100644 --- a/src/mongo/db/s/transaction_coordinator_service_test.cpp +++ b/src/mongo/db/s/transaction_coordinator_service_test.cpp @@ -38,7 +38,6 @@ #include "mongo/db/s/transaction_coordinator_service.h" #include "mongo/db/s/transaction_coordinator_test_fixture.h" #include "mongo/db/write_concern_options.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/transaction_coordinator_test_fixture.cpp b/src/mongo/db/s/transaction_coordinator_test_fixture.cpp index 2891f938e85..3e951dc740a 100644 --- a/src/mongo/db/s/transaction_coordinator_test_fixture.cpp +++ b/src/mongo/db/s/transaction_coordinator_test_fixture.cpp @@ -43,7 +43,6 @@ #include "mongo/s/catalog/sharding_catalog_client_mock.h" #include "mongo/s/catalog/type_shard.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/transaction_coordinator_util.cpp b/src/mongo/db/s/transaction_coordinator_util.cpp index f0968bc0644..7ff54811521 100644 --- a/src/mongo/db/s/transaction_coordinator_util.cpp +++ b/src/mongo/db/s/transaction_coordinator_util.cpp @@ -46,7 +46,6 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { namespace txn { 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 2c335ec636d..d3c4c613e5c 100644 --- a/src/mongo/db/s/txn_two_phase_commit_cmds.cpp +++ b/src/mongo/db/s/txn_two_phase_commit_cmds.cpp @@ -41,7 +41,6 @@ #include "mongo/db/transaction_participant.h" #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/unset_sharding_command.cpp b/src/mongo/db/s/unset_sharding_command.cpp index 61ceb352b0a..2b530b00fb5 100644 --- a/src/mongo/db/s/unset_sharding_command.cpp +++ b/src/mongo/db/s/unset_sharding_command.cpp @@ -38,7 +38,6 @@ #include "mongo/db/commands.h" #include "mongo/db/operation_context.h" #include "mongo/db/s/sharded_connection_info.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/wait_for_majority_service.cpp b/src/mongo/db/s/wait_for_majority_service.cpp index d2895908c49..38bb2cade98 100644 --- a/src/mongo/db/s/wait_for_majority_service.cpp +++ b/src/mongo/db/s/wait_for_majority_service.cpp @@ -41,7 +41,6 @@ #include "mongo/executor/thread_pool_task_executor.h" #include "mongo/logv2/log.h" #include "mongo/util/concurrency/thread_pool.h" -#include "mongo/util/log.h" namespace mongo { |