greptimedb
greptimedb copied to clipboard
Make region lease duration granted by metasrv dynamic
What type of enhancement is this?
Tech debt reduction
What does the enhancement do?
Now the region lease duration is static:
let region_lease_handler = RegionLeaseHandler::new(
distributed_time_constants::REGION_LEASE_SECS, <-- static
table_metadata_manager.clone(),
memory_region_keeper.clone(),
);
It's better to be calculated dynamically, by each datanode's heartbeat interval.
Implementation challenges
No response