Skip to content

Commit 4d4f6aa

Browse files
yawzhangxiaoxichen
authored andcommitted
Fix : handle the case when rreq is nullptr at commit_ext
1 parent a90ae8a commit 4d4f6aa

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class HomestoreConan(ConanFile):
1111
name = "homestore"
12-
version = "7.0.8"
12+
version = "7.0.9"
1313

1414
homepage = "https://github.com/eBay/Homestore"
1515
description = "HomeStore Storage Engine"

src/lib/replication/repl_dev/raft_state_machine.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ raft_buf_ptr_t RaftStateMachine::commit_ext(nuraft::state_machine::ext_op_params
205205
int64_t lsn = s_cast< int64_t >(params.log_idx);
206206
repl_req_ptr_t rreq = lsn_to_req(lsn);
207207
if (m_rd.need_skip_processing(lsn)) {
208-
RD_LOGI(rreq->traceID(), "Raft Channel: Log {} is expected to be handled by snapshot. Skipping commit.", lsn);
208+
// If log replay is skipped, the rreq might be nullptr. Log the event with NO_TRACE_ID if rreq is null.
209+
RD_LOGI(rreq == nullptr ? NO_TRACE_ID : std::to_string(rreq->traceID()),
210+
"Raft Channel: Log {} is expected to be handled by snapshot. Skipping commit.", lsn);
209211
return m_success_ptr;
210212
}
211213
RD_DBG_ASSERT(rreq != nullptr, "Raft channel got null rreq for lsn={}", lsn);

0 commit comments

Comments
 (0)