diff --git a/conanfile.py b/conanfile.py index fd09a4e93..05c596b80 100644 --- a/conanfile.py +++ b/conanfile.py @@ -9,7 +9,7 @@ class HomestoreConan(ConanFile): name = "homestore" - version = "6.5.10" + version = "6.5.11" homepage = "https://github.com/eBay/Homestore" description = "HomeStore Storage Engine" diff --git a/src/lib/common/homestore_config.fbs b/src/lib/common/homestore_config.fbs index 32ba410f6..da058fdb6 100644 --- a/src/lib/common/homestore_config.fbs +++ b/src/lib/common/homestore_config.fbs @@ -242,7 +242,7 @@ table Consensus { stale_log_gap_lo_threshold: int32 = 30; // Minimum log gap a replica has to be from leader before joining the replica set. - min_log_gap_to_join: int32 = 30; + min_log_gap_to_join: int32 = 2147483647; // amount of time in millis to wait on data write before fetch data from remote; wait_data_write_timer_ms: uint64 = 1500 (hotswap); diff --git a/src/lib/replication/service/raft_repl_service.cpp b/src/lib/replication/service/raft_repl_service.cpp index 0469d7829..c53bea2c1 100644 --- a/src/lib/replication/service/raft_repl_service.cpp +++ b/src/lib/replication/service/raft_repl_service.cpp @@ -99,18 +99,17 @@ void RaftReplService::start() { .with_hb_interval(HS_DYNAMIC_CONFIG(consensus.heartbeat_period_ms)) .with_max_append_size(HS_DYNAMIC_CONFIG(consensus.max_append_batch_size)) .with_log_sync_batch_size(HS_DYNAMIC_CONFIG(consensus.log_sync_batch_size)) - // TODO to fix the log_gap thresholds when adding new member. - // When the option is enabled, new member is doing log sync is stuck after the first batch - // where if the option is disabled, new member is going through append entries and it works. -#if 0 .with_log_sync_stopping_gap(HS_DYNAMIC_CONFIG(consensus.min_log_gap_to_join)) -#endif .with_stale_log_gap(HS_DYNAMIC_CONFIG(consensus.stale_log_gap_hi_threshold)) .with_fresh_log_gap(HS_DYNAMIC_CONFIG(consensus.stale_log_gap_lo_threshold)) .with_snapshot_enabled(HS_DYNAMIC_CONFIG(consensus.snapshot_freq_distance)) .with_leadership_expiry(HS_DYNAMIC_CONFIG(consensus.leadership_expiry_ms)) .with_reserved_log_items(HS_DYNAMIC_CONFIG(consensus.num_reserved_log_items)) .with_auto_forwarding(false); + // new_joiner_type fully disabled log pack behavior. + // There is no callback available for handling and localizing the log entries within the pack, which could + // result in data corruption. + r_params.->use_new_joiner_type_ = true; r_params.return_method_ = nuraft::raft_params::async_handler; m_msg_mgr->register_mgr_type(params.default_group_type_, r_params);