Skip to content

Commit

Permalink
Merge pull request eBay#507 from raakella1/reset_rreq_timer
Browse files Browse the repository at this point in the history
start rreq timer after it is linked in state machine
  • Loading branch information
raakella1 authored Aug 16, 2024
2 parents 1e1e868 + 8acd1e5 commit fe44e3b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 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.4.47"
version = "6.4.48"

homepage = "https://github.com/eBay/Homestore"
description = "HomeStore Storage Engine"
Expand Down
3 changes: 2 additions & 1 deletion src/include/homestore/replication/repl_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ struct repl_req_ctx : public boost::intrusive_ref_counter< repl_req_ctx, boost::
friend class SoloReplDev;

public:
repl_req_ctx() { m_start_time = Clock::now(); }
repl_req_ctx() {}
virtual ~repl_req_ctx();
void init(repl_key rkey, journal_type_t op_code, bool is_proposer, sisl::blob const& user_header,
sisl::blob const& key, uint32_t data_size);
Expand Down Expand Up @@ -154,6 +154,7 @@ struct repl_req_ctx : public boost::intrusive_ref_counter< repl_req_ctx, boost::
std::string to_string() const;
std::string to_compact_string() const;
Clock::time_point created_time() const { return m_start_time; }
void set_created_time() { m_start_time = Clock::now(); }
bool is_expired() const;

/////////////////////// All Modifiers methods //////////////////
Expand Down
2 changes: 2 additions & 0 deletions src/lib/replication/repl_dev/raft_state_machine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ void RaftStateMachine::link_lsn_to_req(repl_req_ptr_t rreq, int64_t lsn) {
rreq->add_state(repl_req_state_t::LOG_RECEIVED);
[[maybe_unused]] auto r = m_lsn_req_map.insert(lsn, std::move(rreq));
RD_DBG_ASSERT_EQ(r.second, true, "lsn={} already in precommit list", lsn);
// reset the rreq created_at time to now https://github.com/eBay/HomeStore/issues/506
rreq->set_created_time();
}

repl_req_ptr_t RaftStateMachine::lsn_to_req(int64_t lsn) {
Expand Down

0 comments on commit fe44e3b

Please sign in to comment.