From 9433b09df4bc24e26ab0c4195d9cf82bc2bef2cf Mon Sep 17 00:00:00 2001 From: Yaming Kuang Date: Tue, 30 Jan 2024 16:35:07 -0700 Subject: [PATCH] disable non-recurssive tmr --- src/lib/replication/repl_dev/raft_repl_dev.cpp | 6 ++++-- src/lib/replication/repl_dev/raft_repl_dev.h | 1 - src/tests/test_raft_repl_dev.cpp | 5 ++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/replication/repl_dev/raft_repl_dev.cpp b/src/lib/replication/repl_dev/raft_repl_dev.cpp index 492737ce7..4e2bb363f 100644 --- a/src/lib/replication/repl_dev/raft_repl_dev.cpp +++ b/src/lib/replication/repl_dev/raft_repl_dev.cpp @@ -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); diff --git a/src/lib/replication/repl_dev/raft_repl_dev.h b/src/lib/replication/repl_dev/raft_repl_dev.h index 8fbcebd2a..3184e2cf1 100644 --- a/src/lib/replication/repl_dev/raft_repl_dev.h +++ b/src/lib/replication/repl_dev/raft_repl_dev.h @@ -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 diff --git a/src/tests/test_raft_repl_dev.cpp b/src/tests/test_raft_repl_dev.cpp index 128138863..a7bdf9b11 100644 --- a/src/tests/test_raft_repl_dev.cpp +++ b/src/tests/test_raft_repl_dev.cpp @@ -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); @@ -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 >());