Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/stable/v6.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
szmyd committed Dec 4, 2024
2 parents 793669a + 03cacff commit e8ce543
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class NuRaftMesgConan(ConanFile):
name = "nuraft_mesg"
version = "3.6.4"
version = "3.7.0"

homepage = "https://github.com/eBay/nuraft_mesg"
description = "A gRPC service for NuRAFT"
Expand Down
1 change: 1 addition & 0 deletions src/proto/proto_mesg_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ inline std::shared_ptr< nuraft::resp_msg > toResponse(RaftMessage const& raft_ms
auto const& resp = raft_msg.rc_response();
auto message = std::make_shared< grpc_resp >(base.term(), (nuraft::msg_type)base.type(), base.src(), base.dest(),
resp.next_index(), resp.accepted());
message->set_next_batch_size_hint_in_bytes(resp.batch_size_hint());
message->set_result_code((nuraft::cmd_result_code)(0 - resp.result_code()));
if (nuraft::cmd_result_code::NOT_LEADER == message->get_result_code()) {
LOGI("Leader has changed!");
Expand Down
1 change: 1 addition & 0 deletions src/proto/proto_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ static RCResponse* fromRCResponse(nuraft::resp_msg& rcmsg) {
auto req = new RCResponse;
req->set_next_index(rcmsg.get_next_idx());
req->set_accepted(rcmsg.get_accepted());
req->set_batch_size_hint(rcmsg.get_next_batch_size_hint_in_bytes());
req->set_result_code((ResultCode)(0 - rcmsg.get_result_code()));
auto ctx = rcmsg.get_ctx();
if (ctx) { req->set_context(ctx->data(), ctx->size()); }
Expand Down
1 change: 1 addition & 0 deletions src/proto/raft_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ message RCResponse {
bytes context = 3;
string dest_addr = 4;
ResultCode result_code = 5;
uint64 batch_size_hint = 6;
}

message RaftMessage {
Expand Down

0 comments on commit e8ce543

Please sign in to comment.