Skip to content

Commit

Permalink
change region_worker_tick_interval
Browse files Browse the repository at this point in the history
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
  • Loading branch information
CalvinNeo committed Aug 31, 2022
1 parent 17eb204 commit cc12422
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions components/raftstore/src/store/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ pub struct Config {

#[doc(hidden)]
#[online_config(skip)]
pub region_worker_tick_interval: u64,
pub region_worker_tick_interval: ReadableDuration,

#[doc(hidden)]
#[online_config(skip)]
Expand Down Expand Up @@ -354,8 +354,12 @@ impl Default for Config {
leader_transfer_max_log_lag: 128,
snap_apply_batch_size: ReadableSize::mb(10),
snap_handle_pool_size: 2,
region_worker_tick_interval: PENDING_APPLY_CHECK_INTERVAL,
clean_stale_tick_max: STALE_PEER_CHECK_TICK,
region_worker_tick_interval: if cfg!(feature = "test") {
ReadableDuration::millis(200)
} else {
ReadableDuration::millis(1000)
},
clean_stale_tick_max: if cfg!(feature = "test") { 1 } else { 10 },
lock_cf_compact_interval: ReadableDuration::minutes(10),
lock_cf_compact_bytes_threshold: ReadableSize::mb(256),
// Disable consistency check by default as it will hurt performance.
Expand Down
2 changes: 1 addition & 1 deletion components/raftstore/src/store/fsm/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ impl<EK: KvEngine, ER: RaftEngine> RaftBatchSystem<EK, ER> {
engines.kv.clone(),
mgr.clone(),
cfg.value().snap_apply_batch_size.0 as usize,
cfg.value().region_worker_tick_interval,
cfg.value().region_worker_tick_interval.as_millis(),
cfg.value().clean_stale_tick_max,
cfg.value().use_delete_range,
cfg.value().snap_generator_pool_size,
Expand Down

0 comments on commit cc12422

Please sign in to comment.