From b7eca9073b2377ad9d512f04dbf9b19497eb7f3e Mon Sep 17 00:00:00 2001 From: Ravi Nagarjun Akella Date: Fri, 6 Sep 2024 16:09:58 -0700 Subject: [PATCH] return empty string upon failed client lookup --- conanfile.py | 2 +- src/lib/replication/repl_dev/raft_repl_dev.cpp | 4 +++- src/lib/replication/service/raft_repl_service.cpp | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index 64d35df54..d8f6720b1 100644 --- a/conanfile.py +++ b/conanfile.py @@ -9,7 +9,7 @@ class HomestoreConan(ConanFile): name = "homestore" - version = "6.4.56" + version = "6.4.57" homepage = "https://github.com/eBay/Homestore" description = "HomeStore Storage Engine" diff --git a/src/lib/replication/repl_dev/raft_repl_dev.cpp b/src/lib/replication/repl_dev/raft_repl_dev.cpp index 4c358aa4e..45a018d92 100644 --- a/src/lib/replication/repl_dev/raft_repl_dev.cpp +++ b/src/lib/replication/repl_dev/raft_repl_dev.cpp @@ -1092,7 +1092,7 @@ void RaftReplDev::flush_durable_commit_lsn() { } /////////////////////////////////// Private metohds //////////////////////////////////// -void RaftReplDev::cp_flush(CP*) { +void RaftReplDev::cp_flush(CP* cp) { auto const lsn = m_commit_upto_lsn.load(); auto const clsn = m_compact_lsn.load(); @@ -1108,6 +1108,8 @@ void RaftReplDev::cp_flush(CP*) { m_rd_sb->last_applied_dsn = m_next_dsn.load(); m_rd_sb.write(); m_last_flushed_commit_lsn = lsn; + RD_LOGD("cp flush in raft repl dev, lsn={}, clsn={}, next_dsn={}, cp string:{}", lsn, clsn, m_next_dsn.load(), + cp->to_string()); } void RaftReplDev::cp_cleanup(CP*) {} diff --git a/src/lib/replication/service/raft_repl_service.cpp b/src/lib/replication/service/raft_repl_service.cpp index 12120116a..65d928390 100644 --- a/src/lib/replication/service/raft_repl_service.cpp +++ b/src/lib/replication/service/raft_repl_service.cpp @@ -185,6 +185,7 @@ RaftReplDev* RaftReplService::raft_group_config_found(sisl::byte_view const& buf std::string RaftReplService::lookup_peer(nuraft_mesg::peer_id_t const& peer) { auto const p = m_repl_app->lookup_peer(peer); + if (p.first.empty()) { return {}; } return p.first + ":" + std::to_string(p.second); }