Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idl/duplication.thrift #121

Open
wants to merge 1 commit into
base: fqdn_meta_admin
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions idl/duplication.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -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<dsn.gpid, list<duplication_confirm_entry>> confirm_list;
3:dsn.host_port hp_node;
3:dsn.host_port hp_node1;
}

struct duplication_sync_response
Expand Down
4 changes: 2 additions & 2 deletions src/meta/duplication/meta_duplication_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/meta/test/meta_duplication_service_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class meta_duplication_service_test : public meta_test_base
std::map<gpid, std::vector<duplication_confirm_entry>> confirm_list)
{
auto req = std::make_unique<duplication_sync_request>();
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);
Expand Down
2 changes: 1 addition & 1 deletion src/replica/duplication/duplication_sync_timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void duplication_sync_timer::run()
}

auto req = std::make_unique<duplication_sync_request>();
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()) {
Expand Down
4 changes: 2 additions & 2 deletions src/replica/duplication/test/duplication_sync_timer_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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++) {
Expand Down
Loading