Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonYao287 committed Sep 2, 2024
1 parent 952b530 commit 548121b
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/lib/replication/repl_dev/raft_repl_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1053,14 +1053,6 @@ std::pair< bool, nuraft::cb_func::ReturnCode > RaftReplDev::handle_raft_event(nu
entries.size(), raft_req->get_last_log_term(), start_lsn, start_lsn + entries.size() - 1,
m_commit_upto_lsn.load(), raft_req->get_commit_idx());

if (start_lsn != m_data_journal->next_slot()) {
// if the start_lsn of this batch does not match the next_slot, drop this log batch
// this will happen when the leader is sending the logs which are already received and appended
RD_LOGD("start_lsn={} does not match the next_slot={}, dropping the log batch", start_lsn,
m_data_journal->next_slot());
return {true, nuraft::cb_func::ReturnCode::ReturnNull};
}

if (!entries.empty()) {
RD_LOGT("Raft channel: Received {} append entries on follower from leader, localizing them",
entries.size());
Expand Down

0 comments on commit 548121b

Please sign in to comment.