feat: register & deregister region failure detectors actively (#4223)

* feat: Use DATANODE_LEASE_SECS from distributed_time_constants for heartbeat pause duration

* feat: introduce `RegionFailureDetectorController` to manage region failure detectors

* feat: add `RegionFailureDetectorController` to `DdlContext`

* feat: add `region_failure_detector_controller` to `Context` in region migration

* feat: register region failure detectors during rollback region migration procedure

* feat: deregister region failure detectors during drop table procedure

* feat: register region failure detectors during create table procedure

* fix: update meta config

* chore: apply suggestions from CR

* chore: avoid cloning

* chore: rename

* chore: reduce the size of the test

* chore: apply suggestions from CR

* chore: move channel initialization into `RegionSupervisor::channel`

* chore: minor refactor

* chore: rename ident
This commit is contained in:
Weny Xu
2024-07-01 13:58:27 +08:00
committed by GitHub
parent 214fd38f69
commit 6a634f8e5d
26 changed files with 447 additions and 137 deletions

View File

@@ -84,9 +84,9 @@ impl Arbitrary<'_> for FuzzInput {
let seed = u.int_in_range(u64::MIN..=u64::MAX)?;
let mut rng = ChaChaRng::seed_from_u64(seed);
let columns = rng.gen_range(2..64);
let rows = rng.gen_range(2..4096);
let rows = rng.gen_range(2..2048);
let tables = rng.gen_range(1..64);
let inserts = rng.gen_range(2..16);
let inserts = rng.gen_range(2..8);
Ok(FuzzInput {
columns,
rows,
@@ -264,7 +264,7 @@ async fn execute_failover(ctx: FuzzContext, input: FuzzInput) -> Result<()> {
let mut rng = ChaCha20Rng::seed_from_u64(input.seed);
info!("Generates {} tables", input.tables);
let exprs = generate_create_exprs(input.tables, input.columns, &mut rng)?;
let parallelism = 8;
let parallelism = 4;
let table_ctxs = exprs
.iter()
.map(|expr| Arc::new(TableContext::from(expr)))