Skip to content

Commit

Permalink
Merge pull request #628 from yuwmao/fix
Browse files Browse the repository at this point in the history
Avoid replaying the last flushed log entry
  • Loading branch information
yuwmao authored Jan 9, 2025
2 parents 7734ec8 + 50712d1 commit 96f8e43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class HomestoreConan(ConanFile):
name = "homestore"
version = "6.6.7"
version = "6.6.8"

homepage = "/~https://github.com/eBay/Homestore"
description = "HomeStore Storage Engine"
Expand Down
6 changes: 3 additions & 3 deletions src/lib/replication/repl_dev/raft_repl_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ void RaftReplDev::set_log_store_last_durable_lsn(store_lsn_t lsn) { m_data_journ
void RaftReplDev::on_log_found(logstore_seq_num_t lsn, log_buffer buf, void* ctx) {
auto repl_lsn = to_repl_lsn(lsn);
// apply the log entry if the lsn is between checkpoint lsn and durable commit lsn
if (repl_lsn < m_rd_sb->checkpoint_lsn) { return; }
if (repl_lsn <= m_rd_sb->checkpoint_lsn) { return; }

// 1. Get the log entry and prepare rreq
auto const lentry = to_nuraft_log_entry(buf);
Expand All @@ -1489,8 +1489,8 @@ void RaftReplDev::on_log_found(logstore_seq_num_t lsn, log_buffer buf, void* ctx
RELEASE_ASSERT_EQ(jentry->major_version, repl_journal_entry::JOURNAL_ENTRY_MAJOR,
"Mismatched version of journal entry received from RAFT peer");

RD_LOGT("Raft Channel: Applying Raft log_entry upon recovery: server_id={}, term={}, journal_entry=[{}] ",
jentry->server_id, lentry->get_term(), jentry->to_string());
RD_LOGT("Raft Channel: Applying Raft log_entry upon recovery: server_id={}, term={}, lsn={}, journal_entry=[{}] ",
jentry->server_id, lentry->get_term(), repl_lsn, jentry->to_string());

auto entry_to_hdr = [](repl_journal_entry* jentry) {
return sisl::blob{uintptr_cast(jentry) + sizeof(repl_journal_entry), jentry->user_header_size};
Expand Down

0 comments on commit 96f8e43

Please sign in to comment.