Skip to content

Commit

Permalink
Update NuRaft to latest. (#94)
Browse files Browse the repository at this point in the history
* Update NuRaft to latest. Fixes include eBay/NuRaft#516
* Add missing case statements for error handling.
  • Loading branch information
szmyd authored Jul 29, 2024
1 parent 496d562 commit de0c1c0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
11 changes: 10 additions & 1 deletion 3rd_party/nuraft/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
sources:
"nbi.2.4.1":
url: "https://github.com/eBay/nuraft/archive/f4c8e057080419cc9c845cfb7df95d7c9b2193c4.tar.gz"
sha256: "ba380efe7e9f432a5b48a0bc3426a33128a791d6f7dbcd30ffcad4634fdde5b0"
"nbi.2.4.0":
url: "https://github.com/eBay/nuraft/archive/929132f5a0e86ab3070055c63b485a512f82bcb0.tar.gz"
sha256: "8894be82d396fe3b8eb3ed6e03e65e398c81779bf8c1f8e2345530f8e80da5b3"
patches:
"nbi.2.4.1":
- patch_file: "patches/2-4-0.patch"
patch_description: "Dependency discovery"
patch_type: "conan"
- patch_file: "patches/0002-fwd-pkgs.patch"
patch_description: "Do not cache the leader for forwarding."
"nbi.2.4.0":
- patch_file: "patches/2-4-0.patch"
patch_description: "Dependency discovery"
patch_type: "conan"
- patch_file: "patches/0002-fwd-pkgs.patch"
patch_description: "Do not cache the leader for forwarding."
patch_description: "Do not cache the leader for forwarding."
6 changes: 3 additions & 3 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class NuRaftGrpcConan(ConanFile):
name = "nuraft_grpc"
version = "6.1.0"
version = "6.1.1"
homepage = "https://github.com/eBay/nuraft_mesg"
description = "A gRPC service for NuRAFT"
topics = ("ebay", "nublox", "raft")
Expand Down Expand Up @@ -44,11 +44,11 @@ def configure(self):
def build_requirements(self):
self.build_requires("gtest/1.13.0")
if (self.options.testing):
self.build_requires("jungle_logstore/nbi.20230607")
self.build_requires("jungle_logstore/nbi.20240729")

def requirements(self):
self.requires("boost/1.79.0")
self.requires("nuraft/nbi.2.4.0")
self.requires("nuraft/nbi.2.4.1")
self.requires("openssl/1.1.1s")
self.requires("sisl/8.6.8")

Expand Down
4 changes: 4 additions & 0 deletions src/lib/messaging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,10 @@ static std::error_condition convertToError(nuraft::cmd_result_code const& rc) {
return std::make_error_condition(std::errc::not_supported);
case nuraft::SERVER_IS_LEAVING:
return std::make_error_condition(std::errc::owner_dead);
case nuraft::TERM_MISMATCH:
return std::make_error_condition(std::errc::argument_out_of_domain);
case nuraft::RESULT_NOT_EXIST_YET:
return std::make_error_condition(std::errc::resource_unavailable_try_again);
case nuraft::FAILED:
[[fallthrough]];
default:
Expand Down
4 changes: 2 additions & 2 deletions test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def build(self):
cmake.build()

def requirements(self):
self.requires("jungle_logstore/nbi.20230607")
self.requires("nuraft/nbi.2.2.0")
self.requires("jungle_logstore/nbi.20240729")
self.requires("nuraft/nbi.2.4.1")
self.requires("zlib/1.2.13", override=True)

def test(self):
Expand Down

0 comments on commit de0c1c0

Please sign in to comment.