From 4d5deb9bea6390886382f395b0595658d50fe112 Mon Sep 17 00:00:00 2001 From: ninsmiracle Date: Wed, 23 Oct 2024 16:30:36 +0800 Subject: [PATCH] pass IWYU --- src/meta/meta_backup_engine.cpp | 13 ++++----- src/meta/meta_backup_engine.h | 10 ++----- src/meta/meta_backup_service.cpp | 28 +------------------ src/meta/meta_service.h | 2 -- src/meta/test/meta_http_service_test.cpp | 14 ---------- src/replica/backup/replica_backup_manager.cpp | 21 -------------- src/replica/backup/replica_backup_manager.h | 4 --- src/replica/replica.h | 3 -- src/replica/replica_stub.cpp | 1 - src/replica/test/replica_test.cpp | 1 - 10 files changed, 9 insertions(+), 88 deletions(-) diff --git a/src/meta/meta_backup_engine.cpp b/src/meta/meta_backup_engine.cpp index 17f2c25467..65366d188d 100644 --- a/src/meta/meta_backup_engine.cpp +++ b/src/meta/meta_backup_engine.cpp @@ -16,31 +16,30 @@ // under the License. #include -#include #include #include #include #include #include +#include "absl/strings/string_view.h" #include "backup_types.h" #include "block_service/block_service.h" -#include "block_service/block_service_manager.h" -#include "absl/strings/string_view.h" +#include "common/backup_common.h" #include "common/gpid.h" #include "common/json_helper.h" #include "common/replication.codes.h" #include "dsn.layer2_types.h" -#include "meta_backup_engine.h" #include "meta/meta_backup_service.h" #include "meta/meta_data.h" #include "meta/meta_service.h" +#include "meta/server_state.h" +#include "meta_backup_engine.h" #include "rpc/dns_resolver.h" #include "rpc/rpc_holder.h" #include "rpc/rpc_host_port.h" #include "runtime/api_layer1.h" - #include "task/async_calls.h" #include "task/task.h" #include "task/task_code.h" @@ -49,12 +48,10 @@ #include "utils/blob.h" #include "utils/chrono_literals.h" #include "utils/error_code.h" +#include "utils/fail_point.h" #include "utils/filesystem.h" #include "utils/fmt_logging.h" #include "utils/zlocks.h" -#include "utils/fail_point.h" - -#include "meta_backup_engine.h" namespace dsn { diff --git a/src/meta/meta_backup_engine.h b/src/meta/meta_backup_engine.h index 08baa65e08..0f912bbd44 100644 --- a/src/meta/meta_backup_engine.h +++ b/src/meta/meta_backup_engine.h @@ -17,10 +17,9 @@ #pragma once -#include #include -#include #include +#include #include "backup_types.h" #include "common/json_helper.h" @@ -28,11 +27,6 @@ #include "utils/error_code.h" #include "utils/zlocks.h" -#include "common/backup_common.h" -#include "meta_service.h" -#include "server_state.h" -#include "meta_backup_service.h" - namespace dsn { class blob; class gpid; @@ -45,6 +39,8 @@ class block_filesystem; } // namespace dist namespace replication { +class backup_service; +class meta_service; struct app_backup_info { diff --git a/src/meta/meta_backup_service.cpp b/src/meta/meta_backup_service.cpp index 72e7395e2a..7f77088ad4 100644 --- a/src/meta/meta_backup_service.cpp +++ b/src/meta/meta_backup_service.cpp @@ -16,38 +16,12 @@ // under the License. #include -#include -#include -#include -#include -#include -#include -#include -#include "block_service/block_service.h" -#include "block_service/block_service_manager.h" -#include "common/backup_common.h" -#include "common/replication.codes.h" -#include "common/replication_enums.h" -#include "dsn.layer2_types.h" -#include "meta_backup_engine.h" -#include "meta/meta_data.h" #include "meta/meta_rpc_types.h" -#include "meta/meta_state_service.h" #include "meta_backup_service.h" #include "meta_service.h" -#include "runtime/api_layer1.h" -#include "security/access_controller.h" -#include "task/async_calls.h" -#include "task/task_code.h" -#include "server_state.h" -#include "utils/autoref_ptr.h" -#include "utils/blob.h" -#include "utils/chrono_literals.h" -#include "utils/defer.h" #include "utils/flags.h" -#include "utils/fmt_logging.h" -#include "utils/time_utils.h" +#include "utils/metrics.h" DSN_DECLARE_int32(cold_backup_checkpoint_reserve_minutes); DSN_DECLARE_int32(fd_lease_seconds); diff --git a/src/meta/meta_service.h b/src/meta/meta_service.h index dfbae32f10..efec058640 100644 --- a/src/meta/meta_service.h +++ b/src/meta/meta_service.h @@ -89,8 +89,6 @@ namespace mss { struct meta_storage; } // namespace mss -class backup_service; - namespace test { class test_checker; } diff --git a/src/meta/test/meta_http_service_test.cpp b/src/meta/test/meta_http_service_test.cpp index c70fc7fda8..8d8e4cc0bf 100644 --- a/src/meta/test/meta_http_service_test.cpp +++ b/src/meta/test/meta_http_service_test.cpp @@ -15,38 +15,24 @@ // specific language governing permissions and limitations // under the License. -#include #include #include #include #include #include #include -#include -#include "backup_types.h" #include "bulk_load_types.h" #include "common/gpid.h" #include "common/replication_other_types.h" #include "gtest/gtest.h" #include "http/http_server.h" #include "http/http_status_code.h" -#include "meta/meta_backup_service.h" #include "meta/meta_bulk_load_service.h" #include "meta/meta_data.h" #include "meta/meta_http_service.h" -#include "meta/meta_service.h" -#include "meta/meta_state_service.h" -#include "meta_service_test_app.h" #include "meta_test_base.h" -#include "rpc/rpc_holder.h" -#include "rpc/rpc_message.h" -#include "task/task.h" -#include "task/task_code.h" -#include "utils/autoref_ptr.h" #include "utils/blob.h" -#include "utils/chrono_literals.h" -#include "utils/error_code.h" #include "utils/fail_point.h" namespace dsn { diff --git a/src/replica/backup/replica_backup_manager.cpp b/src/replica/backup/replica_backup_manager.cpp index 70d8d12d45..59a3d48714 100644 --- a/src/replica/backup/replica_backup_manager.cpp +++ b/src/replica/backup/replica_backup_manager.cpp @@ -18,29 +18,8 @@ #include "replica_backup_manager.h" #include -#include -#include -#include -#include -#include -#include -#include -#include "backup_types.h" -#include "common/gpid.h" -#include "common/replication.codes.h" -#include "dsn.layer2_types.h" -#include "metadata_types.h" -#include "replica/replica.h" -#include "replica/replica_context.h" -#include "replica/replication_app_base.h" -#include "runtime/api_layer1.h" -#include "utils/autoref_ptr.h" -#include "utils/filesystem.h" #include "utils/flags.h" -#include "utils/fmt_logging.h" -#include "utils/strings.h" -#include "utils/thread_access_checker.h" #include "utils/metrics.h" METRIC_DEFINE_gauge_int64(replica, diff --git a/src/replica/backup/replica_backup_manager.h b/src/replica/backup/replica_backup_manager.h index 6d0f135e2c..aa941b31ef 100644 --- a/src/replica/backup/replica_backup_manager.h +++ b/src/replica/backup/replica_backup_manager.h @@ -17,11 +17,7 @@ #pragma once -#include - #include "replica/replica_base.h" -#include "task/task.h" -#include "utils/metrics.h" namespace dsn { diff --git a/src/replica/replica.h b/src/replica/replica.h index 4cd725bccb..8878ccfde0 100644 --- a/src/replica/replica.h +++ b/src/replica/replica.h @@ -84,9 +84,6 @@ class access_controller; } // namespace security namespace replication { -class backup_request; -class backup_response; - class configuration_restore_request; class detect_hotkey_request; class detect_hotkey_response; diff --git a/src/replica/replica_stub.cpp b/src/replica/replica_stub.cpp index 4dc2ad719a..1f567e4c5e 100644 --- a/src/replica/replica_stub.cpp +++ b/src/replica/replica_stub.cpp @@ -44,7 +44,6 @@ #include #include -#include "absl/strings/string_view.h" #include "bulk_load/replica_bulk_loader.h" #include "common/backup_common.h" #include "common/duplication_common.h" diff --git a/src/replica/test/replica_test.cpp b/src/replica/test/replica_test.cpp index 6038df8c9b..3bec36cfa1 100644 --- a/src/replica/test/replica_test.cpp +++ b/src/replica/test/replica_test.cpp @@ -52,7 +52,6 @@ #include "rpc/network.sim.h" #include "rpc/rpc_address.h" #include "rpc/rpc_message.h" -#include "runtime/api_layer1.h" #include "task/task_code.h" #include "task/task_tracker.h" #include "test_util/test_util.h"