Skip to content

Commit

Permalink
disable non-recurssive tmr
Browse files Browse the repository at this point in the history
  • Loading branch information
yamingk committed Jan 30, 2024
1 parent b4252c5 commit 9433b09
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/lib/replication/repl_dev/raft_repl_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,15 +560,17 @@ AsyncNotify RaftReplDev::notify_after_data_written(std::vector< repl_req_ptr_t >
// if in resync mode, fetch data from remote immediately;
check_and_fetch_remote_data(rreqs);
} else {
// check_and_fetch_remote_data(rreqs);
check_and_fetch_remote_data(rreqs);
// some data are not in completed state, let's schedule a timer to check it again;
// we wait for data channel to fill in the data. Still if its not done we trigger a fetch from remote;
#if 0
m_wait_data_timer_hdl = iomanager.schedule_global_timer( // timer wakes up in current thread;
HS_DYNAMIC_CONFIG(consensus.wait_data_write_timer_sec) * 1000 * 1000 * 1000, false /* recurring */,
nullptr /* cookie */, iomgr::reactor_regex::all_worker, [this, rreqs](auto) {
nullptr /* cookie */, iomgr::reactor_regex::all_worker, [this, rreqs](auto /*cookie*/) {
LOGINFO("Data Channel: Wait data write timer fired, checking if data is written");
check_and_fetch_remote_data(rreqs);
});
#endif
}

// block waiting here until all the futs are ready (data channel filled in and promises are made);
Expand Down
1 change: 0 additions & 1 deletion src/lib/replication/repl_dev/raft_repl_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ class RaftReplDev : public ReplDev,

bool is_resync_mode() { return m_resync_mode; }
void handle_error(repl_req_ptr_t const& rreq, ReplServiceError err);

};

} // namespace homestore
5 changes: 2 additions & 3 deletions src/tests/test_raft_repl_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,6 @@ class TestReplicatedDB : public homestore::ReplDevListener {
++it;
}

LOGINFO("[Replica={}]: Validating blkid={}, data_size={}", g_helper->replica_num(), v.blkid_.to_string(),
v.data_size_);

auto block_size = SISL_OPTIONS["block_size"].as< uint32_t >();
auto read_sgs = test_common::HSTestHelper::create_sgs(v.data_size_, block_size);

Expand Down Expand Up @@ -315,7 +312,9 @@ TEST_F(RaftReplDevTest, All_Append_Fetch_Remote_Data) {
LOGINFO("Homestore replica={} setup completed", g_helper->replica_num());
g_helper->sync_for_test_start();

#ifdef _PRERELEASE
set_flip_point("simulate_fetch_remote_data");
#endif

if (g_helper->replica_num() == 0) {
// g_helper->sync_dataset_size(SISL_OPTIONS["num_io"].as< uint64_t >());
Expand Down

0 comments on commit 9433b09

Please sign in to comment.