From a2ef9fa842f5c23560eb69379844c80a7f4d1baf Mon Sep 17 00:00:00 2001 From: Yingchun Lai Date: Mon, 29 Jul 2024 11:30:15 +0800 Subject: [PATCH] idl/duplication.thrift --- idl/duplication.thrift | 4 ++-- src/meta/duplication/meta_duplication_service.cpp | 4 ++-- src/meta/test/meta_duplication_service_test.cpp | 2 +- src/replica/duplication/duplication_sync_timer.cpp | 2 +- src/replica/duplication/test/duplication_sync_timer_test.cpp | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/idl/duplication.thrift b/idl/duplication.thrift index 140361ca94..3110baffdc 100644 --- a/idl/duplication.thrift +++ b/idl/duplication.thrift @@ -187,10 +187,10 @@ struct duplication_sync_request { // the address of of the replica server who sends this request // TODO(wutao1): remove this field and get the source address by dsn_msg_from_address - 1:dsn.rpc_address node; + 1:dsn.rpc_address node1; 2:map> confirm_list; - 3:dsn.host_port hp_node; + 3:dsn.host_port hp_node1; } struct duplication_sync_response diff --git a/src/meta/duplication/meta_duplication_service.cpp b/src/meta/duplication/meta_duplication_service.cpp index 02562afeb0..1570718508 100644 --- a/src/meta/duplication/meta_duplication_service.cpp +++ b/src/meta/duplication/meta_duplication_service.cpp @@ -390,10 +390,10 @@ void meta_duplication_service::duplication_sync(duplication_sync_rpc rpc) response.err = ERR_OK; host_port src_hp; - GET_HOST_PORT(request, node, src_hp); + GET_HOST_PORT(request, node1, src_hp); const auto *ns = get_node_state(_state->_nodes, src_hp, false); if (ns == nullptr) { - LOG_WARNING("node({}) is not found in meta server", FMT_HOST_PORT_AND_IP(request, node)); + LOG_WARNING("node({}) is not found in meta server", FMT_HOST_PORT_AND_IP(request, node1)); response.err = ERR_OBJECT_NOT_FOUND; return; } diff --git a/src/meta/test/meta_duplication_service_test.cpp b/src/meta/test/meta_duplication_service_test.cpp index 54a58af87d..72eb88ae84 100644 --- a/src/meta/test/meta_duplication_service_test.cpp +++ b/src/meta/test/meta_duplication_service_test.cpp @@ -170,7 +170,7 @@ class meta_duplication_service_test : public meta_test_base std::map> confirm_list) { auto req = std::make_unique(); - SET_IP_AND_HOST_PORT_BY_DNS(*req, node, hp); + SET_IP_AND_HOST_PORT_BY_DNS(*req, node1, hp); req->confirm_list = confirm_list; duplication_sync_rpc rpc(std::move(req), RPC_CM_DUPLICATION_SYNC); diff --git a/src/replica/duplication/duplication_sync_timer.cpp b/src/replica/duplication/duplication_sync_timer.cpp index 7337d91890..e81eb5f042 100644 --- a/src/replica/duplication/duplication_sync_timer.cpp +++ b/src/replica/duplication/duplication_sync_timer.cpp @@ -70,7 +70,7 @@ void duplication_sync_timer::run() } auto req = std::make_unique(); - SET_IP_AND_HOST_PORT(*req, node, _stub->primary_address(), _stub->primary_host_port()); + SET_IP_AND_HOST_PORT(*req, node1, _stub->primary_address(), _stub->primary_host_port()); // collects confirm points from all primaries on this server for (const replica_ptr &r : _stub->get_all_primaries()) { diff --git a/src/replica/duplication/test/duplication_sync_timer_test.cpp b/src/replica/duplication/test/duplication_sync_timer_test.cpp index 0f7855ed72..08b435edbe 100644 --- a/src/replica/duplication/test/duplication_sync_timer_test.cpp +++ b/src/replica/duplication/test/duplication_sync_timer_test.cpp @@ -120,7 +120,7 @@ class duplication_sync_timer_test : public duplication_test_base ASSERT_EQ(duplication_sync_rpc::mail_box().size(), 1); auto &req = duplication_sync_rpc::mail_box().back().request(); - ASSERT_IP_AND_HOST_PORT(req, node, stub->primary_address(), stub->primary_host_port()); + ASSERT_IP_AND_HOST_PORT(req, node1, stub->primary_address(), stub->primary_host_port()); // ensure confirm list is empty when no progress ASSERT_EQ(0, req.confirm_list.size()); @@ -143,7 +143,7 @@ class duplication_sync_timer_test : public duplication_test_base ASSERT_EQ(duplication_sync_rpc::mail_box().size(), 1); auto &req = *duplication_sync_rpc::mail_box().back().mutable_request(); - ASSERT_IP_AND_HOST_PORT(req, node, stub->primary_address(), stub->primary_host_port()); + ASSERT_IP_AND_HOST_PORT(req, node1, stub->primary_address(), stub->primary_host_port()); ASSERT_EQ(req.confirm_list.size(), total_app_num); for (int appid = 1; appid <= total_app_num; appid++) {