Skip to content

Commit

Permalink
Merge pull request #463 from raakella1/null_request_blob
Browse files Browse the repository at this point in the history
handle nullptr request blob in data channel
  • Loading branch information
raakella1 authored Jul 16, 2024
2 parents 4fba7c7 + 6e3c3ad commit 57b44b6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class HomestoreConan(ConanFile):
name = "homestore"
version = "6.4.24"
version = "6.4.25"
homepage = "https://github.com/eBay/Homestore"
description = "HomeStore Storage Engine"
topics = ("ebay", "nublox")
Expand All @@ -31,7 +31,6 @@ class HomestoreConan(ConanFile):
'skip_testing': False,
}


generators = "cmake", "cmake_find_package"
exports_sources = "cmake/*", "src/*", "CMakeLists.txt", "test_wrap.sh", "LICENSE"
keep_imports = True
Expand Down
10 changes: 10 additions & 0 deletions src/lib/replication/repl_dev/raft_repl_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ void RaftReplDev::push_data_to_all_followers(repl_req_ptr_t rreq, sisl::sg_list

void RaftReplDev::on_push_data_received(intrusive< sisl::GenericRpcData >& rpc_data) {
auto const& incoming_buf = rpc_data->request_blob();
if (!incoming_buf.cbytes()) {
RD_LOGW("Data Channel: PushData received with empty buffer, ignoring this call");
rpc_data->send_response();
return;
}
auto const fb_size =
flatbuffers::ReadScalar< flatbuffers::uoffset_t >(incoming_buf.cbytes()) + sizeof(flatbuffers::uoffset_t);
auto push_req = GetSizePrefixedPushDataRequest(incoming_buf.cbytes());
Expand Down Expand Up @@ -597,6 +602,11 @@ void RaftReplDev::fetch_data_from_remote(std::vector< repl_req_ptr_t > rreqs) {

void RaftReplDev::on_fetch_data_received(intrusive< sisl::GenericRpcData >& rpc_data) {
auto const& incoming_buf = rpc_data->request_blob();
if (!incoming_buf.cbytes()) {
RD_LOGW("Data Channel: PushData received with empty buffer, ignoring this call");
rpc_data->send_response();
return;
}
auto fetch_req = GetSizePrefixedFetchData(incoming_buf.cbytes());

RD_LOGD("Data Channel: FetchData received: fetch_req.size={}", fetch_req->request()->entries()->size());
Expand Down

0 comments on commit 57b44b6

Please sign in to comment.