From 7ef8833fe32e05c1e55bfdb42a3ae02022d4a57e Mon Sep 17 00:00:00 2001 From: neverchanje Date: Fri, 21 Sep 2018 13:44:59 +0800 Subject: [PATCH 1/6] *: remove *.types.h files --- include/dsn/cpp/serialization.h | 57 ++++-------- .../serialization_helper/dsn.layer2.types.h | 15 ---- include/dsn/dist/cli/cli.client.h | 1 - include/dsn/dist/cli/cli.server.h | 1 - include/dsn/dist/cli/cli.types.h | 12 --- .../failure_detector/fd.code.definition.h | 1 - include/dsn/dist/failure_detector/fd.types.h | 14 --- include/dsn/dist/replication.h | 1 - .../dsn/dist/replication/duplication_common.h | 1 - .../dsn/dist/replication/replication.types.h | 90 ------------------- .../dist/replication/replication_app_base.h | 1 - .../replication/replication_other_types.h | 1 - include/dsn/service_api_cpp.h | 1 - src/apps/echo/echo.code.definition.h | 1 - src/apps/echo/echo.types.h | 11 --- src/apps/skv/simple_kv.client.2.h | 1 - src/apps/skv/simple_kv.server.h | 1 - src/apps/skv/simple_kv.types.h | 12 --- src/core/core/common_providers.cpp | 2 - src/core/core/partition_resolver_simple.h | 1 - src/dist/nfs/nfs.types.h | 14 --- src/dist/nfs/nfs_client.h | 1 - src/dist/nfs/nfs_client_impl.h | 1 - src/dist/nfs/nfs_code_definition.h | 1 - src/dist/nfs/nfs_server.h | 1 - .../replication/meta_server/meta_options.h | 1 - .../replication/test/meta_test/misc/misc.cpp | 1 - .../replication/test/meta_test/misc/misc.h | 1 - .../test/simple_kv/simple_kv.client.h | 1 - .../test/simple_kv/simple_kv.server.h | 1 - 30 files changed, 16 insertions(+), 232 deletions(-) delete mode 100644 include/dsn/cpp/serialization_helper/dsn.layer2.types.h delete mode 100644 include/dsn/dist/cli/cli.types.h delete mode 100644 include/dsn/dist/failure_detector/fd.types.h delete mode 100644 include/dsn/dist/replication/replication.types.h delete mode 100644 src/apps/echo/echo.types.h delete mode 100644 src/apps/skv/simple_kv.types.h delete mode 100644 src/dist/nfs/nfs.types.h diff --git a/include/dsn/cpp/serialization.h b/include/dsn/cpp/serialization.h index 807f026743..7aaa04322e 100644 --- a/include/dsn/cpp/serialization.h +++ b/include/dsn/cpp/serialization.h @@ -50,61 +50,36 @@ std::string no_registered_function_error_notice(const T &t, dsn_msg_serialize_fo } // namespace serialization -#define THRIFT_MARSHALLER \ - case DSF_THRIFT_BINARY: \ - marshall_thrift_binary(writer, value); \ - break; \ - case DSF_THRIFT_JSON: \ - marshall_thrift_json(writer, value); \ - break; - -#define THRIFT_UNMARSHALLER \ - case DSF_THRIFT_BINARY: \ - unmarshall_thrift_binary(reader, value); \ - break; \ - case DSF_THRIFT_JSON: \ - unmarshall_thrift_json(reader, value); \ - break; - -// the following 2 functions is for thrift basic type serialization -template -inline void marshall(binary_writer &writer, const T &value, dsn_msg_serialize_format fmt) +template +inline void marshall(binary_writer &writer, const ThriftType &value, dsn_msg_serialize_format fmt) { switch (fmt) { - THRIFT_MARSHALLER + case DSF_THRIFT_BINARY: + marshall_thrift_binary(writer, value); + break; + case DSF_THRIFT_JSON: + marshall_thrift_json(writer, value); + break; default: dassert(false, serialization::no_registered_function_error_notice(value, fmt).c_str()); } } -template -inline void unmarshall(binary_reader &reader, T &value, dsn_msg_serialize_format fmt) +template +inline void unmarshall(binary_reader &reader, ThriftType &value, dsn_msg_serialize_format fmt) { switch (fmt) { - THRIFT_UNMARSHALLER + case DSF_THRIFT_BINARY: + unmarshall_thrift_binary(reader, value); + break; + case DSF_THRIFT_JSON: + unmarshall_thrift_json(reader, value); + break; default: dassert(false, serialization::no_registered_function_error_notice(value, fmt).c_str()); } } -#define GENERATED_TYPE_SERIALIZATION(GType, SerializationType) \ - inline void marshall(binary_writer &writer, const GType &value, dsn_msg_serialize_format fmt) \ - { \ - switch (fmt) { \ - SerializationType##_MARSHALLER default \ - : dassert(false, \ - serialization::no_registered_function_error_notice(value, fmt).c_str()); \ - } \ - } \ - inline void unmarshall(binary_reader &reader, GType &value, dsn_msg_serialize_format fmt) \ - { \ - switch (fmt) { \ - SerializationType##_UNMARSHALLER default \ - : dassert(false, \ - serialization::no_registered_function_error_notice(value, fmt).c_str()); \ - } \ - } - template inline void marshall(dsn::message_ex *msg, const T &val) { diff --git a/include/dsn/cpp/serialization_helper/dsn.layer2.types.h b/include/dsn/cpp/serialization_helper/dsn.layer2.types.h deleted file mode 100644 index f8cfb7da72..0000000000 --- a/include/dsn/cpp/serialization_helper/dsn.layer2.types.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once -#include -#include -#include - - - - -namespace dsn { - GENERATED_TYPE_SERIALIZATION(partition_configuration, THRIFT) - GENERATED_TYPE_SERIALIZATION(configuration_query_by_index_request, THRIFT) - GENERATED_TYPE_SERIALIZATION(configuration_query_by_index_response, THRIFT) - GENERATED_TYPE_SERIALIZATION(app_info, THRIFT) - -} \ No newline at end of file diff --git a/include/dsn/dist/cli/cli.client.h b/include/dsn/dist/cli/cli.client.h index bfbb0cce70..f77adfe5a7 100644 --- a/include/dsn/dist/cli/cli.client.h +++ b/include/dsn/dist/cli/cli.client.h @@ -38,7 +38,6 @@ #include #include #include -#include #include namespace dsn { diff --git a/include/dsn/dist/cli/cli.server.h b/include/dsn/dist/cli/cli.server.h index 5c026b5948..4ceb413219 100644 --- a/include/dsn/dist/cli/cli.server.h +++ b/include/dsn/dist/cli/cli.server.h @@ -28,7 +28,6 @@ #include #include #include -#include namespace dsn { class cli_service : public ::dsn::serverlet diff --git a/include/dsn/dist/cli/cli.types.h b/include/dsn/dist/cli/cli.types.h deleted file mode 100644 index 717880883f..0000000000 --- a/include/dsn/dist/cli/cli.types.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once -#include -#include -#include - - - - -namespace dsn { - GENERATED_TYPE_SERIALIZATION(command, THRIFT) - -} diff --git a/include/dsn/dist/failure_detector/fd.code.definition.h b/include/dsn/dist/failure_detector/fd.code.definition.h index 982a9ccca8..583c2bd717 100644 --- a/include/dsn/dist/failure_detector/fd.code.definition.h +++ b/include/dsn/dist/failure_detector/fd.code.definition.h @@ -34,7 +34,6 @@ */ #pragma once -#include namespace dsn { namespace fd { diff --git a/include/dsn/dist/failure_detector/fd.types.h b/include/dsn/dist/failure_detector/fd.types.h deleted file mode 100644 index 75b8aec993..0000000000 --- a/include/dsn/dist/failure_detector/fd.types.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once -#include -#include -#include - - - - -namespace dsn { namespace fd { - GENERATED_TYPE_SERIALIZATION(beacon_msg, THRIFT) - GENERATED_TYPE_SERIALIZATION(beacon_ack, THRIFT) - GENERATED_TYPE_SERIALIZATION(config_master_message, THRIFT) - -} } \ No newline at end of file diff --git a/include/dsn/dist/replication.h b/include/dsn/dist/replication.h index a5bb932886..069a6bb532 100644 --- a/include/dsn/dist/replication.h +++ b/include/dsn/dist/replication.h @@ -36,6 +36,5 @@ #pragma once #include -#include #include #include diff --git a/include/dsn/dist/replication/duplication_common.h b/include/dsn/dist/replication/duplication_common.h index acebd8426b..d109b2c758 100644 --- a/include/dsn/dist/replication/duplication_common.h +++ b/include/dsn/dist/replication/duplication_common.h @@ -26,7 +26,6 @@ #pragma once -#include #include #include #include diff --git a/include/dsn/dist/replication/replication.types.h b/include/dsn/dist/replication/replication.types.h deleted file mode 100644 index a457b56572..0000000000 --- a/include/dsn/dist/replication/replication.types.h +++ /dev/null @@ -1,90 +0,0 @@ -#pragma once -#include -#include -#include - -namespace dsn { -namespace replication { -GENERATED_TYPE_SERIALIZATION(mutation_header, THRIFT) -GENERATED_TYPE_SERIALIZATION(mutation_update, THRIFT) -GENERATED_TYPE_SERIALIZATION(mutation_data, THRIFT) -GENERATED_TYPE_SERIALIZATION(replica_configuration, THRIFT) -GENERATED_TYPE_SERIALIZATION(prepare_msg, THRIFT) -GENERATED_TYPE_SERIALIZATION(read_request_header, THRIFT) -GENERATED_TYPE_SERIALIZATION(write_request_header, THRIFT) -GENERATED_TYPE_SERIALIZATION(rw_response_header, THRIFT) -GENERATED_TYPE_SERIALIZATION(prepare_ack, THRIFT) -GENERATED_TYPE_SERIALIZATION(learn_state, THRIFT) -GENERATED_TYPE_SERIALIZATION(learn_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(learn_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(learn_notify_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(group_check_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(group_check_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(node_info, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_update_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_update_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(replica_server_info, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_query_by_node_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_query_by_node_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(create_app_options, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_create_app_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(drop_app_options, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_drop_app_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_list_apps_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_list_nodes_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_cluster_info_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_recall_app_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_create_app_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_meta_control_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_meta_control_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_proposal_action, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_balancer_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_balancer_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_drop_app_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_list_apps_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_list_nodes_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_cluster_info_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_recall_app_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(query_replica_decree_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(query_replica_decree_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(replica_info, THRIFT) -GENERATED_TYPE_SERIALIZATION(query_replica_info_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(query_replica_info_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(query_app_info_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(query_app_info_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_recovery_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_recovery_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(policy_info, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_restore_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(backup_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(backup_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_modify_backup_policy_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_modify_backup_policy_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_add_backup_policy_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_add_backup_policy_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(policy_entry, THRIFT) -GENERATED_TYPE_SERIALIZATION(backup_entry, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_query_backup_policy_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_query_backup_policy_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_report_restore_status_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_report_restore_status_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_query_restore_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_query_restore_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_update_app_env_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(configuration_update_app_env_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(duplication_add_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(duplication_add_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(duplication_status_change_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(duplication_status_change_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(duplication_entry, THRIFT) -GENERATED_TYPE_SERIALIZATION(duplication_query_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(duplication_query_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(duplication_confirm_entry, THRIFT) -GENERATED_TYPE_SERIALIZATION(duplication_sync_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(duplication_sync_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(ddd_diagnose_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(ddd_node_info, THRIFT) -GENERATED_TYPE_SERIALIZATION(ddd_partition_info, THRIFT) -GENERATED_TYPE_SERIALIZATION(ddd_diagnose_response, THRIFT) -} -} diff --git a/include/dsn/dist/replication/replication_app_base.h b/include/dsn/dist/replication/replication_app_base.h index bfb92968b4..644784ebba 100644 --- a/include/dsn/dist/replication/replication_app_base.h +++ b/include/dsn/dist/replication/replication_app_base.h @@ -42,7 +42,6 @@ #include #include -#include #include #include #include diff --git a/include/dsn/dist/replication/replication_other_types.h b/include/dsn/dist/replication/replication_other_types.h index 590ecd5501..5820c1368c 100644 --- a/include/dsn/dist/replication/replication_other_types.h +++ b/include/dsn/dist/replication/replication_other_types.h @@ -36,7 +36,6 @@ #define replication_OTHER_TYPES_H #include -#include #include namespace dsn { diff --git a/include/dsn/service_api_cpp.h b/include/dsn/service_api_cpp.h index 3b075171f1..61229763e7 100644 --- a/include/dsn/service_api_cpp.h +++ b/include/dsn/service_api_cpp.h @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/src/apps/echo/echo.code.definition.h b/src/apps/echo/echo.code.definition.h index 33c70a14dc..ad3b4c35ed 100644 --- a/src/apps/echo/echo.code.definition.h +++ b/src/apps/echo/echo.code.definition.h @@ -34,7 +34,6 @@ */ #pragma once #include -#include "echo.types.h" namespace dsn { namespace example { diff --git a/src/apps/echo/echo.types.h b/src/apps/echo/echo.types.h deleted file mode 100644 index b81b391dee..0000000000 --- a/src/apps/echo/echo.types.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once -#include -#include - - -#include "echo_types.h" - - -namespace dsn { namespace example { - -} } \ No newline at end of file diff --git a/src/apps/skv/simple_kv.client.2.h b/src/apps/skv/simple_kv.client.2.h index 88786c5156..3eb14d4012 100644 --- a/src/apps/skv/simple_kv.client.2.h +++ b/src/apps/skv/simple_kv.client.2.h @@ -1,6 +1,5 @@ #pragma once #include "simple_kv.code.definition.h" -#include "simple_kv.types.h" #include #include #include diff --git a/src/apps/skv/simple_kv.server.h b/src/apps/skv/simple_kv.server.h index fcf2ee5927..b0844cc650 100644 --- a/src/apps/skv/simple_kv.server.h +++ b/src/apps/skv/simple_kv.server.h @@ -40,7 +40,6 @@ #include #include "simple_kv.code.definition.h" -#include "simple_kv.types.h" namespace dsn { namespace replication { diff --git a/src/apps/skv/simple_kv.types.h b/src/apps/skv/simple_kv.types.h deleted file mode 100644 index ae148458e0..0000000000 --- a/src/apps/skv/simple_kv.types.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once -#include -#include - - -#include "simple_kv_types.h" - - -namespace dsn { namespace replication { namespace application { - GENERATED_TYPE_SERIALIZATION(kv_pair, THRIFT) - -} } } \ No newline at end of file diff --git a/src/core/core/common_providers.cpp b/src/core/core/common_providers.cpp index a15a556393..23e38f4cb7 100644 --- a/src/core/core/common_providers.cpp +++ b/src/core/core/common_providers.cpp @@ -35,8 +35,6 @@ #include "partition_resolver_simple.h" #include -#include - namespace dsn { namespace dist { static bool register_component_provider(const char *name, diff --git a/src/core/core/partition_resolver_simple.h b/src/core/core/partition_resolver_simple.h index d830f534fb..f6f50a8455 100644 --- a/src/core/core/partition_resolver_simple.h +++ b/src/core/core/partition_resolver_simple.h @@ -39,7 +39,6 @@ #include #include #include -#include namespace dsn { namespace dist { diff --git a/src/dist/nfs/nfs.types.h b/src/dist/nfs/nfs.types.h deleted file mode 100644 index 9c2a263e96..0000000000 --- a/src/dist/nfs/nfs.types.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once -#include -#include - -#include "nfs_types.h" - -namespace dsn { -namespace service { -GENERATED_TYPE_SERIALIZATION(copy_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(copy_response, THRIFT) -GENERATED_TYPE_SERIALIZATION(get_file_size_request, THRIFT) -GENERATED_TYPE_SERIALIZATION(get_file_size_response, THRIFT) -} -} \ No newline at end of file diff --git a/src/dist/nfs/nfs_client.h b/src/dist/nfs/nfs_client.h index 7f0f3737c5..f82022a535 100644 --- a/src/dist/nfs/nfs_client.h +++ b/src/dist/nfs/nfs_client.h @@ -29,7 +29,6 @@ #include #include -#include "nfs.types.h" #include "nfs_code_definition.h" namespace dsn { diff --git a/src/dist/nfs/nfs_client_impl.h b/src/dist/nfs/nfs_client_impl.h index 17eb2e2c72..d93eb8672a 100644 --- a/src/dist/nfs/nfs_client_impl.h +++ b/src/dist/nfs/nfs_client_impl.h @@ -39,7 +39,6 @@ #include #include -#include "nfs.types.h" #include "nfs_client.h" namespace dsn { diff --git a/src/dist/nfs/nfs_code_definition.h b/src/dist/nfs/nfs_code_definition.h index 5a6fecfa2a..6cd1c08814 100644 --- a/src/dist/nfs/nfs_code_definition.h +++ b/src/dist/nfs/nfs_code_definition.h @@ -33,7 +33,6 @@ * xxxx-xx-xx, author, fix bug about xxx */ #pragma once -#include "nfs.types.h" namespace dsn { namespace service { diff --git a/src/dist/nfs/nfs_server.h b/src/dist/nfs/nfs_server.h index 499acbcbc5..6f14734371 100644 --- a/src/dist/nfs/nfs_server.h +++ b/src/dist/nfs/nfs_server.h @@ -28,7 +28,6 @@ #include #include #include "nfs_code_definition.h" -#include "nfs.types.h" namespace dsn { namespace service { diff --git a/src/dist/replication/meta_server/meta_options.h b/src/dist/replication/meta_server/meta_options.h index e5b8edb7d9..aaaec9c6c5 100644 --- a/src/dist/replication/meta_server/meta_options.h +++ b/src/dist/replication/meta_server/meta_options.h @@ -36,7 +36,6 @@ #include #include -#include namespace dsn { namespace replication { diff --git a/src/dist/replication/test/meta_test/misc/misc.cpp b/src/dist/replication/test/meta_test/misc/misc.cpp index 8cc45355b1..0cc7db5b8f 100644 --- a/src/dist/replication/test/meta_test/misc/misc.cpp +++ b/src/dist/replication/test/meta_test/misc/misc.cpp @@ -2,7 +2,6 @@ #include #include -#include #include "dist/replication/common/replication_common.h" #include "misc.h" diff --git a/src/dist/replication/test/meta_test/misc/misc.h b/src/dist/replication/test/meta_test/misc/misc.h index 4019072516..39f45f4277 100644 --- a/src/dist/replication/test/meta_test/misc/misc.h +++ b/src/dist/replication/test/meta_test/misc/misc.h @@ -4,7 +4,6 @@ #include #include #include -#include #include "dist/replication/meta_server/meta_data.h" #include "dist/replication/common/fs_manager.h" diff --git a/src/dist/replication/test/simple_kv/simple_kv.client.h b/src/dist/replication/test/simple_kv/simple_kv.client.h index 3b0c48e881..3e87c1dbde 100644 --- a/src/dist/replication/test/simple_kv/simple_kv.client.h +++ b/src/dist/replication/test/simple_kv/simple_kv.client.h @@ -30,7 +30,6 @@ #include #include "simple_kv.code.definition.h" -#include "simple_kv.types.h" #include "case.h" namespace dsn { diff --git a/src/dist/replication/test/simple_kv/simple_kv.server.h b/src/dist/replication/test/simple_kv/simple_kv.server.h index efc27fdc4e..34326e91f8 100644 --- a/src/dist/replication/test/simple_kv/simple_kv.server.h +++ b/src/dist/replication/test/simple_kv/simple_kv.server.h @@ -40,7 +40,6 @@ #include #include "simple_kv.code.definition.h" -#include "simple_kv.types.h" namespace dsn { namespace replication { From f053205c3c19a26d3b1351c923c4edf62d2710e6 Mon Sep 17 00:00:00 2001 From: neverchanje Date: Fri, 21 Sep 2018 16:08:32 +0800 Subject: [PATCH 2/6] fix header deps --- include/dsn/dist/failure_detector/fd.client.h | 3 ++- include/dsn/dist/failure_detector/fd.code.definition.h | 3 +++ include/dsn/dist/replication/replication_enums.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/dsn/dist/failure_detector/fd.client.h b/include/dsn/dist/failure_detector/fd.client.h index 6255e58b9d..64636a2cde 100644 --- a/include/dsn/dist/failure_detector/fd.client.h +++ b/include/dsn/dist/failure_detector/fd.client.h @@ -34,8 +34,9 @@ */ #pragma once -#include "fd.code.definition.h" + #include +#include #include #include diff --git a/include/dsn/dist/failure_detector/fd.code.definition.h b/include/dsn/dist/failure_detector/fd.code.definition.h index 583c2bd717..320d753196 100644 --- a/include/dsn/dist/failure_detector/fd.code.definition.h +++ b/include/dsn/dist/failure_detector/fd.code.definition.h @@ -35,6 +35,9 @@ #pragma once +#include +#include + namespace dsn { namespace fd { diff --git a/include/dsn/dist/replication/replication_enums.h b/include/dsn/dist/replication/replication_enums.h index 6f67e78f28..27b989c41d 100644 --- a/include/dsn/dist/replication/replication_enums.h +++ b/include/dsn/dist/replication/replication_enums.h @@ -1,6 +1,7 @@ #pragma once #include +#include namespace dsn { ENUM_BEGIN2(app_status::type, app_status, app_status::AS_INVALID) From 61960492fe543e096a9c3ec551b06c7d4da67324 Mon Sep 17 00:00:00 2001 From: neverchanje Date: Fri, 21 Sep 2018 16:12:31 +0800 Subject: [PATCH 3/6] fix header deps --- include/dsn/dist/cli/cli.server.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dsn/dist/cli/cli.server.h b/include/dsn/dist/cli/cli.server.h index 4ceb413219..819265acfb 100644 --- a/include/dsn/dist/cli/cli.server.h +++ b/include/dsn/dist/cli/cli.server.h @@ -28,6 +28,7 @@ #include #include #include +#include namespace dsn { class cli_service : public ::dsn::serverlet From 47d37962c282cb5d31bec939348383ecc47218bb Mon Sep 17 00:00:00 2001 From: neverchanje Date: Fri, 21 Sep 2018 16:26:11 +0800 Subject: [PATCH 4/6] fix header deps --- include/dsn/dist/replication/replication_app_base.h | 1 + src/apps/skv/simple_kv.code.definition.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/dsn/dist/replication/replication_app_base.h b/include/dsn/dist/replication/replication_app_base.h index 644784ebba..66bbc5d4f8 100644 --- a/include/dsn/dist/replication/replication_app_base.h +++ b/include/dsn/dist/replication/replication_app_base.h @@ -44,6 +44,7 @@ #include #include #include +#include #include #include diff --git a/src/apps/skv/simple_kv.code.definition.h b/src/apps/skv/simple_kv.code.definition.h index 41b624c8a4..361f54d594 100644 --- a/src/apps/skv/simple_kv.code.definition.h +++ b/src/apps/skv/simple_kv.code.definition.h @@ -36,6 +36,8 @@ #pragma once #include +#include "simple_kv_types.h" + namespace dsn { namespace replication { namespace application { From 1a3c8ffd845877d787f68606cb18360c6c93aa7e Mon Sep 17 00:00:00 2001 From: neverchanje Date: Fri, 21 Sep 2018 16:29:01 +0800 Subject: [PATCH 5/6] fix header deps --- src/core/core/partition_resolver_simple.h | 1 + src/dist/nfs/nfs_client.h | 1 + src/dist/nfs/nfs_server.h | 1 + 3 files changed, 3 insertions(+) diff --git a/src/core/core/partition_resolver_simple.h b/src/core/core/partition_resolver_simple.h index f6f50a8455..d03836e4eb 100644 --- a/src/core/core/partition_resolver_simple.h +++ b/src/core/core/partition_resolver_simple.h @@ -39,6 +39,7 @@ #include #include #include +#include namespace dsn { namespace dist { diff --git a/src/dist/nfs/nfs_client.h b/src/dist/nfs/nfs_client.h index f82022a535..e1d1d82d96 100644 --- a/src/dist/nfs/nfs_client.h +++ b/src/dist/nfs/nfs_client.h @@ -30,6 +30,7 @@ #include #include "nfs_code_definition.h" +#include "nfs_types.h" namespace dsn { namespace service { diff --git a/src/dist/nfs/nfs_server.h b/src/dist/nfs/nfs_server.h index 6f14734371..086e3e1c49 100644 --- a/src/dist/nfs/nfs_server.h +++ b/src/dist/nfs/nfs_server.h @@ -28,6 +28,7 @@ #include #include #include "nfs_code_definition.h" +#include "nfs_types.h" namespace dsn { namespace service { From 617b217fd09586063b89c3384c0843fe619c4eab Mon Sep 17 00:00:00 2001 From: neverchanje Date: Mon, 24 Sep 2018 22:32:39 +0800 Subject: [PATCH 6/6] fix --- include/dsn/dist/failure_detector/fd.client.h | 1 - include/dsn/dist/replication/replication_enums.h | 1 - include/dsn/dist/replication/replication_other_types.h | 1 + src/apps/skv/simple_kv.client.2.h | 1 + src/apps/skv/simple_kv.code.definition.h | 2 -- src/apps/skv/simple_kv.server.h | 3 ++- src/dist/nfs/nfs_client.h | 2 +- 7 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/dsn/dist/failure_detector/fd.client.h b/include/dsn/dist/failure_detector/fd.client.h index 63ba1d6ab8..6255e58b9d 100644 --- a/include/dsn/dist/failure_detector/fd.client.h +++ b/include/dsn/dist/failure_detector/fd.client.h @@ -35,7 +35,6 @@ #pragma once #include "fd.code.definition.h" - #include #include #include diff --git a/include/dsn/dist/replication/replication_enums.h b/include/dsn/dist/replication/replication_enums.h index 27b989c41d..6f67e78f28 100644 --- a/include/dsn/dist/replication/replication_enums.h +++ b/include/dsn/dist/replication/replication_enums.h @@ -1,7 +1,6 @@ #pragma once #include -#include namespace dsn { ENUM_BEGIN2(app_status::type, app_status, app_status::AS_INVALID) diff --git a/include/dsn/dist/replication/replication_other_types.h b/include/dsn/dist/replication/replication_other_types.h index 5820c1368c..efc9bfafcd 100644 --- a/include/dsn/dist/replication/replication_other_types.h +++ b/include/dsn/dist/replication/replication_other_types.h @@ -36,6 +36,7 @@ #define replication_OTHER_TYPES_H #include +#include #include namespace dsn { diff --git a/src/apps/skv/simple_kv.client.2.h b/src/apps/skv/simple_kv.client.2.h index 3eb14d4012..2c90b9a95f 100644 --- a/src/apps/skv/simple_kv.client.2.h +++ b/src/apps/skv/simple_kv.client.2.h @@ -1,5 +1,6 @@ #pragma once #include "simple_kv.code.definition.h" +#include "simple_kv_types.h" #include #include #include diff --git a/src/apps/skv/simple_kv.code.definition.h b/src/apps/skv/simple_kv.code.definition.h index 361f54d594..41b624c8a4 100644 --- a/src/apps/skv/simple_kv.code.definition.h +++ b/src/apps/skv/simple_kv.code.definition.h @@ -36,8 +36,6 @@ #pragma once #include -#include "simple_kv_types.h" - namespace dsn { namespace replication { namespace application { diff --git a/src/apps/skv/simple_kv.server.h b/src/apps/skv/simple_kv.server.h index b0844cc650..40d328603d 100644 --- a/src/apps/skv/simple_kv.server.h +++ b/src/apps/skv/simple_kv.server.h @@ -40,6 +40,7 @@ #include #include "simple_kv.code.definition.h" +#include "simple_kv_types.h" namespace dsn { namespace replication { @@ -50,7 +51,7 @@ class simple_kv_service : public replication_app_base, public storage_serverlet< simple_kv_service(replica *r) : replication_app_base(r) {} virtual ~simple_kv_service() {} - virtual int on_request(dsn::message_ex* request) override { return handle_request(request); } + virtual int on_request(dsn::message_ex *request) override { return handle_request(request); } protected: // all service handlers to be implemented further // RPC_SIMPLE_KV_SIMPLE_KV_READ diff --git a/src/dist/nfs/nfs_client.h b/src/dist/nfs/nfs_client.h index e1d1d82d96..7d59847c1e 100644 --- a/src/dist/nfs/nfs_client.h +++ b/src/dist/nfs/nfs_client.h @@ -29,8 +29,8 @@ #include #include -#include "nfs_code_definition.h" #include "nfs_types.h" +#include "nfs_code_definition.h" namespace dsn { namespace service {